Monday, July 13, 2009

Microsoft Access Experts only...SQL Coding help!!!?

Currently there's a form (1st form) that if you select a user ID from a combo (drop down box) it displays in a data table the person's machine, IP address and Domain name and if you enter one and click “refresh” it updates the table with the right info. I’m trying to create a similar type of form (My form) where you enter an IP Address in the drop down box and it will show all the User IDs that have used that IP Address in the data table. For some reason, the data isn’t being displayed in the data table even though I know I have the right select query written…





1st form:





SELECT qryUniqueUID.USERNAME FROM qryUniqueUID;





My form:





SELECT qryIPAddress.ADDRESS FROM qryIPAddress;








In the combo box’s properties, there are many tabs (Format, Data, Event, Other, All). And the location where that code above is written is in a row called “Row Source” in Data tab.





Any advice would be appreciated on what to do…thanks.

Microsoft Access Experts only...SQL Coding help!!!?
Is there an ADDRESS field in the qryIPAddress query? Run the qryIPAddress query with a test ip address and see if it brings back any data.
Reply:cmbIPdropdown contains a list of IP addresses.





When you select the IP address from the dropdown, you need


to create a query like this:





select * From "The table that contains the user Info" Where


IPAddress='" %26amp; cmbIPdropdown.value %26amp; "'"





Then you need to set the data table Row Source to the query.

stalk

No comments:

Post a Comment