Change a query by fieldname

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I have a form that will be used to track software
licenses, on the form it will list the Software (swName)
the number of licenses purchased, the number available,
and a listbox displaying all the computers they're
currently installed on. Now I can make a form that will
add this query for me, however I need the query to change
for every different software name.

Is this possible at all? Any little tidbits of knowledge
are greatly appreciated.
 
I have a form that will be used to track software
licenses, on the form it will list the Software (swName)
the number of licenses purchased, the number available,
and a listbox displaying all the computers they're
currently installed on. Now I can make a form that will
add this query for me, however I need the query to change
for every different software name.

Is this possible at all? Any little tidbits of knowledge
are greatly appreciated.

How do you need the query to change?

If it's only to allow the user to enter the software name, instead of
putting "Microsoft Access" on the Criteria line, put

[Enter software name:]

This is called a "Parameter Query" and will search for (exactly)
whatever the user types.

A bit better for the user, if a bit more work: create a small unbound
Form, frmCrit let's call it; on it have a Combo Box listing all the
valid values of swName (cboSoftware). Now you can put on the criteria
line

[Forms]![frmCrit]![cboSoftware]

The user will not have to worry about spelling the name right, just
pick it from a list. Put a command button on frmCrit to open a Report
or a Form based on the query.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top