Hi,
I'm having some problems with this function. In the following pieces of code, the function doesn't work properly:
-------------------------------
Private Sub Command26_Click()
MsgBox "Zijn alle verplichte velden ingevoerd?", vbOKCancel
If vbCancel Then
Else
DoCmd.OpenForm "bachelor_alumnus_invoer"
DoCmd.Close acForm, "Subadres_Bachelor_invoer"
End If
End Sub
-------------------------------------------------
I want to stop the execution (so stay in the same form, Subadres_......) if the user presses the cancel button in the dialog box. But if the user presses "ok" nothing happens..
The same problem here:
--------------------------------------------------
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If me.[naam] ="null" then
DoCmd.close
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Hulpform_BsC_adres"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Hulpform_BsC_functie"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Hulpform_BsC_opleiding"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Hulpform_BsC_foto"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close
End if
Exit_Command26_Click:
Exit Sub
Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click
End Sub
--------------------------------------------------
Im not a programmer so i don't know where to look for solutions, hope someone can help me.
Thnx Spikey
I'm having some problems with this function. In the following pieces of code, the function doesn't work properly:
-------------------------------
Private Sub Command26_Click()
MsgBox "Zijn alle verplichte velden ingevoerd?", vbOKCancel
If vbCancel Then
Else
DoCmd.OpenForm "bachelor_alumnus_invoer"
DoCmd.Close acForm, "Subadres_Bachelor_invoer"
End If
End Sub
-------------------------------------------------
I want to stop the execution (so stay in the same form, Subadres_......) if the user presses the cancel button in the dialog box. But if the user presses "ok" nothing happens..
The same problem here:
--------------------------------------------------
Private Sub Command26_Click()
On Error GoTo Err_Command26_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If me.[naam] ="null" then
DoCmd.close
Else
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Hulpform_BsC_adres"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Hulpform_BsC_functie"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Hulpform_BsC_opleiding"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
stDocName = "Hulpform_BsC_foto"
stLinkCriteria = "[AlumnusID]=" & Me![AlumnusID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close
End if
Exit_Command26_Click:
Exit Sub
Err_Command26_Click:
MsgBox Err.Description
Resume Exit_Command26_Click
End Sub
--------------------------------------------------
Im not a programmer so i don't know where to look for solutions, hope someone can help me.
Thnx Spikey