inventory control

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

Hi, I'm in the process of creating a database for a stores system in a
maintenence dept. Can some1 please tell me help me with a problem?

I have a window with a 3 combo boxes in it.

In the first box i want to be a ble to select either of 2 production lines,

In the second combo box i want to be able to have listed the major areas on
the prodution line that was selected in the first combo box (but not the
areas on the non listed production line)

In the 3rd combo box i wasn to be a ble to select specific components in the
area that i picked in the second box

I have tried all sorts to do this. ie linking etc but dont seem to be able
to get anywhere, can some1 please help me

Thanks
Roger
 
Use the Afterupdate event procedure of the first combo to set the RowSource
of the 2nd, and so on.

Example:

Private Sub Combo1_AfterUpdate()
If Not IsNull(Me.Combo1) Then
Me.Combo2.RowSource = "SELECT SomeField FROM tblArea WHERE SomeField
= " & Me.Combo1 & ";"
End If
End Sub
 
Try something like this:

Use Select statements or saved queries for combo box row sources which
include the name of the preceding combo. Then use the AfterUpdate event to
requery the next combo:

Combo1:
Select * From Table1;

Sub Combo1_AfterUpdate()
Me.Combo2.Requery
End Sub

Combo2:
Select * From Table2
Where ID = Forms!ThisForm!Combo1;

Sub Combo2_AfterUpdate()
Me.Combo3.Requery
End Sub

Combo3:
Select * From Table2
Where ID = Forms!ThisForm!Combo2;
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top