Opening forms from a query?? (1 Viewer)

jer

Registered User.
Local time
Today, 00:10
Joined
Nov 21, 2011
Messages
109
Hi everyone!!
I have a form which uses a combo box. When i select an entry from the combo box it runs a query an returns several results. A list of tools to be exact. Is there any way that I can click on one fo the tools on the list and automatically be sent to a tool data form which is the detailed record for that tool?
any help would be great!!
thanks in advance!!
Jer
 

smig

Registered User.
Local time
Today, 02:10
Joined
Nov 25, 2009
Messages
2,209
Do you mean open a form after you select something in the tool's List box?
 

jer

Registered User.
Local time
Today, 00:10
Joined
Nov 21, 2011
Messages
109
well firstly i have a dialog box that when i select a pallet name it runs a query and opens up a list of all tools in another window.. is there any way i can have that list display on the form instead? Also from this list, can i select a tool and automatically be brought to a form with all that tools info there!! i.e picture, dimensions etc??
 

smig

Registered User.
Local time
Today, 02:10
Joined
Nov 25, 2009
Messages
2,209
aren't window and form the same :confused:

yes you can have a sub form that wil show the details of the selected tool.
Link the sub form to the main form based on the ToolId
 

jer

Registered User.
Local time
Today, 00:10
Joined
Nov 21, 2011
Messages
109
i have a combobox with the names of the pallets etc. how do i set the rowsource of the list box to display the tools in the pallet depending on the pallet i selected from the combobox?

this is the code im using and i know the spaces in the names is messing me about!! :(

palletcontents.RowSource = "Select Tooling List.[Tool NO#] " & _
"FROM Tooling List " & _
"WHERE Tooling List.Assigned Pallet = '" & cboPallet.Value & "' " & _
"ORDER BY Tooling List.Assigned Pallet;"

the combobox with the pallet names is called cboPallet
the list box is called palletcontents
the main db list is called Tooling List
I want the list box the display Tool No#, Serial No# and Description..
Any ideas?
 

vbaInet

AWF VIP
Local time
Today, 00:10
Joined
Jan 22, 2010
Messages
26,374
I have a form which uses a combo box. When i select an entry from the combo box it runs a query an returns several results. A list of tools to be exact. Is there any way that I can click on one fo the tools on the list and automatically be sent to a tool data form which is the detailed record for that tool?
How does your last post relate to your original post? You said you want to select an item in the combo box and be taken to a form that will list the details of that tool.

Where does listbox come in :confused:
 

jer

Registered User.
Local time
Today, 00:10
Joined
Nov 21, 2011
Messages
109
my boss told me now that he wants to be able to select a pallet form the combobox which populates a listbox or some other method.. basically after selecting the pallet from the combo box, he wants a list of the tools in the pallet to display on the form and then the user can click on a tool if they want and view all the details of that tool.. sorry about the confusion!!
 

vbaInet

AWF VIP
Local time
Today, 00:10
Joined
Jan 22, 2010
Messages
26,374
Tell your boss he or she should make up his or her mind :mad: :)

Ok, look at your code, there's a space here:
Code:
"WHERE Tooling List.Assigned Pallet = '" & cboPallet.Value & [COLOR=Red]"' "[/COLOR] & _
Can you see it?

Also, after you set the RowSource, you need to Requery it.
 

jer

Registered User.
Local time
Today, 00:10
Joined
Nov 21, 2011
Messages
109
thanks for the help guys!
 

jer

Registered User.
Local time
Today, 00:10
Joined
Nov 21, 2011
Messages
109
Ya i got it working. Just needed a push in the right direction. I understand the theory of vba and ms access, im just very inexperienced at writing code and referencing. That and I only started using Access 3 weeks ago!!
 

Users who are viewing this thread

Top Bottom