ljoekelsoey4
Registered User.
- Local time
- Today, 10:02
- Joined
- Mar 16, 2017
- Messages
- 49
Hello, I'm getting the error when clicking on the link "add new" to a seperate form that is used to enter data in the table that is shown via a subform on the page. I'm not sure what has changed exactly, but prior to christmas (when i last worked on this) everything worked fine. >_<
Thanks for your help
EDIT: when a CHI number (id number) has been selected in the main form, if i open the subform from the navigation pane, there is no problem, and I am able to enter and save new data in the corresponding tables. not sure if this is of any help/significance.
Thanks for your help
EDIT: when a CHI number (id number) has been selected in the main form, if i open the subform from the navigation pane, there is no problem, and I am able to enter and save new data in the corresponding tables. not sure if this is of any help/significance.
Code:
Option Compare Database
Private Sub biopsynewadd_Click()
If CHI Is Null Then
MsgBox "You need to select a patient before you can enter data"
Cancel = True
DoCmd.CancelEvent
Else
DoCmd.OpenForm "frmFontanBiopsyAdd"
End If
End Sub
Private Sub bloodtestnewadd_Click()
If CHI Is Null Then
MsgBox "You need to select a patient before you can enter data"
Cancel = True
DoCmd.CancelEvent
Else
DoCmd.OpenForm "frmFontanBloodTestAdd"
End If
End Sub
Private Sub CTaddnew_Click()
If CHI Is Null Then
MsgBox "You need to select a patient before you can enter data"
Cancel = True
DoCmd.CancelEvent
Else
DoCmd.OpenForm "frmFontanCTAdd"
End If
End Sub
Private Sub elastographyaddnew_Click()
If CHI Is Null Then
MsgBox "You need to select a patient before you can enter data"
Cancel = True
DoCmd.CancelEvent
Else
DoCmd.OpenForm "frmFontanElastographyAdd"
End If
End Sub
Private Sub ultrasoundaddnew_Click()
If CHI Is Null Then
MsgBox "You need to select a patient before you can enter data"
Cancel = True
DoCmd.CancelEvent
Else
DoCmd.OpenForm "frmFontanUltrasoundAdd"
End If
End Sub
Private Sub endoscopyaddnew_Click()
If CHI Is Null Then
MsgBox "You need to select a patient before you can enter data"
Cancel = True
DoCmd.CancelEvent
Else
DoCmd.OpenForm "frmFontanEndoscopyAdd"
End If
End Sub
Private Sub cmdCLOSE_Click()
DoCmd.Close
End Sub
Attachments
Last edited: