query based on combo box=

  • Thread starter Thread starter Joseph
  • Start date Start date
J

Joseph

Hi,

I'm trying to list records based on what i select on the combo box.
For example there are bunch of machines name and ip arranged in two
groups unix, or windows. Now the combo box should only list windows, or
unix for me to choose from. Based on what i choose have all the record
listed on the form. I am have alot of difficulty with this. If anyone
could help i would appreciate it.

thanks
 
Joseph,

I assume there is a field in your Machines table that identifies each
machine as either Windows or Unix? The general idea here is probably to
make a query based on your table, and use this query as the Record
Source of your form, and use the value selected in the combobox as a
criteria in the query. The syntax of the entry in the query criteria
will be something along these lines...
[Forms]![NameOfForm]![NameOfCombobox]
and this will go in the Criteria of the Windows/Unix column in the
query. The Row Source Type property of the combobox can be set to Value
List, and the Row Source property set to like this...
Windows;Unix
 
Steve,

You are correct on the assumption each machine having either Windows
or Unix. I've gone through the instructions and it does list the OS
Type but it will not display other information. I have other fields
that lists the machne name etc based on what OS type is selected. I
think I am close but not quite there yet. I have set the Row Source
type and Row Source Property as you have specified but any other text
box will not display the proper info. I have set the data source of the
form to the query.

thanks for the help
joseph
 
Steve,

You are correct on the assumption each machine having either Windows
or Unix. I've gone through the instructions and it does list the OS
Type but it will not display other information. I have other fields
that lists the machne name etc based on what OS type is selected. I
think I am close but not quite there yet. I have set the Row Source
type and Row Source Property as you have specified but any other text
box will not display the proper info. I have set the data source of the
form to the query.

thanks for the help
joseph
 
Ok i think i've figured out why... I have to have an Event Procedure on
After Update. Is there a command to run query and update the form?

thanks again
joseph
 
Joseph,

On the basis of what you have told us so far, it is not clear what you
are doing. If the Windows/Unix selector combobox is on the form itself,
try this on the After Update event of the combobox...
Me.Requery
 
Back
Top