Changing label captions

Eddie Mason

Registered User.
Local time
Today, 02:15
Joined
Jan 31, 2003
Messages
142
Hi All,

I have a form that “frmSelect that I want to use a query to control its text box labels. I’ve tried putting the following into the load event of the form:

Private Sub Form_Load()
Dim db As Database, rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("qrySSummary")

Me!lblMonShift1.Caption = rs![Mon1]
Me!lblMonShift2.Caption = rs![Mon2]
Me!lblMonShift3.Caption = rs![Mon3]
Me!lblMonShift4.Caption = rs![Mon4]


End Sub

This works perfectly until I try to select which record in the query that I want to use. I use in the criteria of the “qrySelecr” query the following Forms!frmSelect![EmpNo], but when I try to open the form I get an error telling me incorrect parameters.

Can anyone help me sort this out.

Regards

Eddie
 

Users who are viewing this thread

Back
Top Bottom