CamaroMan
01-29-2008, 12:41 PM
I could use some advice on how to fill a label with a table value from access after the user chooses a value from the combo box also driven by an access table. The dropdown combo box is loading the values from the table, but when you click on a value, the label does not change accordingly. Here is my code for loading the combo meal. :confused:
Private Sub cboJobs_DropDown()
Dim db As Database
Dim rs As Recordset
'Set global database path
Set db = OpenDatabase("C:\Documents and Settings\HP_Owner\My Documents\database\PayRate.mdb")
'Set local rs to get next booking number
Set rs = db.OpenRecordset("PayRate")
rs.MoveFirst
Do Until rs.EOF
cboJobs.AddItem rs.Fields("JobTitle")
rs.MoveNext
Loop
End Sub
'calls on the table in the database
Private Sub datContact_Reposition()
Static pblnFirst As Boolean
If pblnFirst = False Then
Set mrstContact = datContact.Recordset
pblnFirst = True
End If
End Sub
Private Sub cboJobs_DropDown()
Dim db As Database
Dim rs As Recordset
'Set global database path
Set db = OpenDatabase("C:\Documents and Settings\HP_Owner\My Documents\database\PayRate.mdb")
'Set local rs to get next booking number
Set rs = db.OpenRecordset("PayRate")
rs.MoveFirst
Do Until rs.EOF
cboJobs.AddItem rs.Fields("JobTitle")
rs.MoveNext
Loop
End Sub
'calls on the table in the database
Private Sub datContact_Reposition()
Static pblnFirst As Boolean
If pblnFirst = False Then
Set mrstContact = datContact.Recordset
pblnFirst = True
End If
End Sub