grobermatic
Technical User
Hi all,
I have code which does custom data validation on my form, it then interacts with another program (Attachmate EXTRA! Personal Client) before moving to a new record on the form.
'--- Data Validation Code ---
' XXXXXXXXXXXXXXXXXXXXXXXXXX
'--- Data Validation Code ---
'AUTO NOTE Account
If MsgBox("Do you want to automatically note EVT1 and the Scratchpad?", vbQuestion + vbYesNo, "Note Account?") = vbYes Then
If Me.Payment_Info_AccNumber = ExCap("accnumber") Then
Note_EVT "OPPP", 4, Me.[Card Types] & " payment for " & Format(Me.Amount, "Currency") & " (AUTO-NOTE)"
Note_Scratchpad Me.[Card Types] & " " & Format(Me.Amount, "Currency") & " " & Date
dteHoldUntil = Date + 7
Add_LetterHold dteHoldUntil
Else
MsgBox "The AutoNotes could not be actioned because this account is no longer active on EXTRA!", vbExclamation, "AutoNote"
End If
Else
End If
'Reset form for new record
'Reset account number to Enabled
Me.Payment_Info_AccNumber.Enabled = True
Me.lblAccProt.Visible = False 'Make message invisible
DoCmd.GoToRecord , , acNewRec
Set_User_and_Date
Me.Payment_Info_AccNumber.SetFocus
Me.imgDelta.Visible = False
Me.imgSolo.Visible = False
Me.imgSwitch.Visible = False
The code works fine when I comment out the AUTONOTE Account section, but when I add it back in the code seems to pause when it gets to DoCmd.GoToRecord , , acNewRec. The strange thing is when I step through the code it seems to move on to theis line with no errors or problems.
Any ideas what could be stopping my code?
I can post more code if necessary for the Sub Procedures that I call in the above code.
Regards
Craig
--------------------------------------------------------------------------------------------------------
"Time-traveling is just too dangerous. Better that I devote myself to study the other great mystery of the universe: Women!" .. Dr E. Brown (1985)
I have code which does custom data validation on my form, it then interacts with another program (Attachmate EXTRA! Personal Client) before moving to a new record on the form.
'--- Data Validation Code ---
' XXXXXXXXXXXXXXXXXXXXXXXXXX
'--- Data Validation Code ---
'AUTO NOTE Account
If MsgBox("Do you want to automatically note EVT1 and the Scratchpad?", vbQuestion + vbYesNo, "Note Account?") = vbYes Then
If Me.Payment_Info_AccNumber = ExCap("accnumber") Then
Note_EVT "OPPP", 4, Me.[Card Types] & " payment for " & Format(Me.Amount, "Currency") & " (AUTO-NOTE)"
Note_Scratchpad Me.[Card Types] & " " & Format(Me.Amount, "Currency") & " " & Date
dteHoldUntil = Date + 7
Add_LetterHold dteHoldUntil
Else
MsgBox "The AutoNotes could not be actioned because this account is no longer active on EXTRA!", vbExclamation, "AutoNote"
End If
Else
End If
'Reset form for new record
'Reset account number to Enabled
Me.Payment_Info_AccNumber.Enabled = True
Me.lblAccProt.Visible = False 'Make message invisible
DoCmd.GoToRecord , , acNewRec
Set_User_and_Date
Me.Payment_Info_AccNumber.SetFocus
Me.imgDelta.Visible = False
Me.imgSolo.Visible = False
Me.imgSwitch.Visible = False
The code works fine when I comment out the AUTONOTE Account section, but when I add it back in the code seems to pause when it gets to DoCmd.GoToRecord , , acNewRec. The strange thing is when I step through the code it seems to move on to theis line with no errors or problems.
Any ideas what could be stopping my code?
I can post more code if necessary for the Sub Procedures that I call in the above code.
Regards
Craig
--------------------------------------------------------------------------------------------------------
"Time-traveling is just too dangerous. Better that I devote myself to study the other great mystery of the universe: Women!" .. Dr E. Brown (1985)