I have a database set up for time sheets and need help creating some combo boxes that are synchronized based on the information in the first box, then the second box which populates the third box. The joint table is called Timesheet. The first combo box (cboStorm) would pull StormID from Storm Names table. The second box (cboPW) would pull PWNumberID from PW Codes table. (There is a column in PW Codes called StormID to tie them together) The third combo box (cboCref) would pull CPSBRefID from CPSBRef table. (There is a column in CPSBRef called PWNumberID to tie them together)
Can someone please help me out? I've been able to get the first two to synchronize but I kept getting a parameter error. I tried to use the VBA method off of the Microsoft Access site with the following code as an After Update Event for cboStorm.
Option Compare Database
Private Sub cboStorm_AfterUpdate()
Me.cboPW.RowSource = "SELECT PWNumberID FROM" & _
" PW Codes WHERE StormID = " & Me.cboStorm & _
" ORDER BY PWNumberID"
Me.cboPW = Me.cboPW.ItemData(0)
End Sub
I can upload a test database also to my website if someone needs to look at it/can help. Thanks!