Vortex566 Posted May 5, 2009 Share Posted May 5, 2009 Okay, This is really annoying me now if was in PHP I could do it in two seconds but Access is getting the better of me. I have a form lets call it A I have a query lets call it B I want a field in A to be part of the B query. I do not know how to do it any ideas? Link to comment Share on other sites More sharing options...
0 thevink Posted May 5, 2009 Share Posted May 5, 2009 You can always put a temporary query behind a button on the form then you can make the query in the code Set Db = CurrentDb Set qdef = Db.CreateQueryDef("temp") sqlStr = "SELECT * FROM Table_Name WHERE ID = " & Forms(<formname>).txtField.Value & ";" qdef.SQL = sqlStr DoCmd.SetWarnings False DoCmd.OpenQuery "temp", acViewNormal, acReadOnly CurrentDb.QueryDefs.Delete ("temp") DoCmd.SetWarnings True qdef.Close Db.Close Link to comment Share on other sites More sharing options...
Question
Vortex566
Okay,
This is really annoying me now if was in PHP I could do it in two seconds but Access is getting the better of me.
I have a form lets call it A I have a query lets call it B I want a field in A to be part of the B query. I do not know how to do it any ideas?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts