Form Search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a parameter query (just two columns) that i set up to work from a
form. The columns are: Part # and Level.

In the design view of the query under the criteria column under Part # i type:
[Forms]![Form1]![texboxname] and deselect the show check mark under Part #.
when i run the query from the form view, the corresponding level is
beautifully displayed in a table.

Thing is, i am working with Forms and i want the level to be displayed in a
textbox within the form NOT in a table.

Any suggestions? Please be specific i am relatively new to access.

much thanks.
 
You an use a DlookUp in the control source of the text field.
=DlookUp("Level","QueryName")

Or, a more common way to do this, create a combo that includes both fields
Select [Part #],Level From TableName

In the control source of the text box you can write
=[ComboName].Column(1)

Noth: the column count start with 0

that way the user can't make mistakes when selecting Part number, it will
always exist
 
o.k thank you for you suggestion, you have helped me a lot.

I figured if i got the idea i would apply that to modify my form. This is
what i have...
A query with columns: Part No., Level 1, Level 2, ... Level 6, Machine No.

When i run the query from the form i created, it works perfectly and the
result from the search is displayed in a table.

what i want is for the result to be displayed on the form, each in a
separate texbox such as "Level1" in one, "Level2" in the other etc. Every
part number is different so only 1 record will be found.

In the design view of the query, i have the "show" checkmark selected but i
dont want the result in a table.

i tried what you suggested before but i am not sure if i fully understand.

how do i change this. Please help.

thank you in advance.



Ofer Cohen said:
You an use a DlookUp in the control source of the text field.
=DlookUp("Level","QueryName")

Or, a more common way to do this, create a combo that includes both fields
Select [Part #],Level From TableName

In the control source of the text box you can write
=[ComboName].Column(1)

Noth: the column count start with 0

that way the user can't make mistakes when selecting Part number, it will
always exist

--
Good Luck
BS"D


fervet said:
I have a parameter query (just two columns) that i set up to work from a
form. The columns are: Part # and Level.

In the design view of the query under the criteria column under Part # i type:
[Forms]![Form1]![texboxname] and deselect the show check mark under Part #.
when i run the query from the form view, the corresponding level is
beautifully displayed in a table.

Thing is, i am working with Forms and i want the level to be displayed in a
textbox within the form NOT in a table.

Any suggestions? Please be specific i am relatively new to access.

much thanks.
 
Back
Top