Selasa, 18 April 2017

Re: [MS_AccessPros] combo box filter criteria

 

OK, so I did this and it works but it leads me to a couple of questions for the purpose of education. I made a text box on the form frmSampleGroupsAndUsers (this is the "called" form), and named it txtLocationID and assigned it the value Forms!frmConfigureSampleGroupsAndUsers!cboSelectSite.column(1).  For now I have left the control visible so I can see that it is working.

In the query criteria I first tried Me.txtLocationID and I got an empty query result.  I changed to "long Hand" and put Forms!frmSampleGroupsAndUsers.txtLocationID and it works fine.  question 1 is why would Me.txtLocationID not work?

Question 2 is why would the text box method work, but creating a variable in the event code not work.  I had already tried creating a variable lngLocationID, assigning the column(1) value to the variable, and using the variable in the query.  No joy there.

Question 3 is, could I have passed the value I needed with OpenArgs and used OpenArgs as the query criteria?

So much to learn...

__._,_.___

Posted by: david.pratt@outlook.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar