ScrmingWhisprs
I <3 Coffee Milk.
- Local time
- Today, 15:43
- Joined
- Jun 29, 2006
- Messages
- 156
Yet another issue with my volunteer tracker...
On my Workers form, frmWorkers, I have a subform that displays each night they worked with TimeIn and TimeOut, and DateID, which links that transaction to tblDates. I also have a Sign In button on my form that opens a popup form based on tblBuildingTransactions, and most of the information including their name and DateID is filled in. That works great. However, I would like a MsgBox to appear if the DateID on that form matches a DateID that is on the Workers subform. This will mean they are already signed in for that particular night. I have the following code, but it says it "cannot find the field 'frmWorkersSubBuild' referred to in you expression."
Maybe I'm not just referring to the form correctly. The form is open, the Sign-In form that this code is attached to is a pop up.
Eventually I would like Access to ignore adding this new transaction when the OK button on the message box is click, but I'd like to get the message box to work first.
Thanks
ScrmingWhisprs
On my Workers form, frmWorkers, I have a subform that displays each night they worked with TimeIn and TimeOut, and DateID, which links that transaction to tblDates. I also have a Sign In button on my form that opens a popup form based on tblBuildingTransactions, and most of the information including their name and DateID is filled in. That works great. However, I would like a MsgBox to appear if the DateID on that form matches a DateID that is on the Workers subform. This will mean they are already signed in for that particular night. I have the following code, but it says it "cannot find the field 'frmWorkersSubBuild' referred to in you expression."
Code:
Private Sub Form_Load()
If Me.BuildingDate = Forms!frmWorkers!frmWorkersSubBuild.Form!BuildingDate Then
MsgBox "This worker is already signed in.", vbExclamation, "Error"
End If
End Sub
Maybe I'm not just referring to the form correctly. The form is open, the Sign-In form that this code is attached to is a pop up.
Eventually I would like Access to ignore adding this new transaction when the OK button on the message box is click, but I'd like to get the message box to work first.
Thanks
ScrmingWhisprs