MS Access 2003 - VBA for Parameter box that open after code is run: auto "ok"?
So there is a parameter box that open after a button click event runs an sql statement in vb for a list box to populate data. something like:
me.listbox.rowsource = "SELECT tblMain.ID, TblMain.FirstName, TblMain.LastName, tblMain.MobileNumber FROM tblMain;"
then i count the result for display like:
me.recordcounter = me.listbox.listcount
for some reason when I this button click event it still throws up a parameter box for the query asking for a mobile number?? which if you just click through gets you to t开发者_如何学Gohe browse all results i am looking for. is there a way i can write something that automatically tells that box the ok has been clicked so it doesn't even appear? or is this avoiding something worse than a random pain??
thanks
EDIT:
apologies i just noticed that everything (all controls, etc) are in the form header?? too many people have access to this, its all mucked up. sorry...much fixes to do before I can even ask a legit question. acbSoundex from Cookbook is also in here and throwing this for a loop. thanks though
The parameter box will appear if the query contains a field/param that is not in the table/not specified.
It would seem that the MobileNumber field (if what you state) might be spelled incorrectly, or is not part of the underlyinh table/query.
Verify that you table structure is correct in regards, to the query you supplied, or supply the table structure so that we can have a look.
精彩评论