Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-16-2017, 11:56 AM   #1
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Duplicating Sequential numeric form numbers

Hello everyone,

I created DB for item check in/out. Everytime item is issued, it prints the form with sequential form #. I couldn't use the Autonumber as it skips the number so used DMax to assign next number. It worked great until few days ago. Now we have over 20K records, access somehow creating a new record with the same form number. How is it possible? Did I make mistake anywhere in the code(see below)? I new to both DB and VBA. Please help.


Code:
Private Sub BtnSubmit_Click()

On Error GoTo Problem

' chekcing all fields are filled

 If IsNull(Me.Shift) Or (Me.Shift = "") Then
        MsgBox "Please select the Shift.", vbOKOnly, "Required Data"
            Me.Shift.SetFocus
        Exit Sub
 End If

 If IsNull(Me.Location) Or (Me.Location = "") Then
        MsgBox "Please select the Location.", vbOKOnly, "Required Data"
            Me.Location.SetFocus
        Exit Sub
 End If
 If (Me.CboAmount = 0) Then
        MsgBox "Please select the Amount.", vbOKOnly, "Required Data"
            Me.CboAmount.SetFocus
        Exit Sub
 End If
 If IsNull(Me.CboNGEmp) Or (Me.CboNGEmp = "") Then
        MsgBox "Please enter employee's Lic# .", vbOKOnly, "Required Data"
            Me.CboNGEmp.SetFocus
        Exit Sub
 End If
 If IsNull(Me.CboCOEmp) Or (Me.CboCOEmp = "") Then
        MsgBox "Please enter Cashier's Lic#", vbOKOnly, "Required Data"
            Me.CboCOEmp.SetFocus
        Exit Sub
 End If
    
    'Assigns a form number
    Me.TxtFormNo.Value = Nz(DMax("[IssFormNo]", "TblTransactions"), 0) + 1
    DoCmd.RunCommand acCmdSaveRecord
    
    'error handling if form number is already used
Problem:
If Err.Number = 3022 Then
    Me.TxtFormNo.Value = Nz(DMax("[IssFormNo]", "TblTransactions"), 0) + 1
    DoCmd.RunCommand acCmdSaveRecord
    Resume Next
End If
    
    'Printing a form Issue
    DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
    'YES?NO for printout options to reprint document if didn't print
    Dim LResponse As Integer
       LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
      While (LResponse = vbNo)
            DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
            LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
        Wend
     'Going to new record to issue another bank.
    DoCmd.RunCommand acCmdRecordsGoToNew
    Call EnableTab

End Sub


Last edited by donsi; 04-16-2017 at 12:04 PM. Reason: unfinished post
donsi is offline   Reply With Quote
Old 04-16-2017, 02:05 PM   #2
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,253
Thanks: 77
Thanked 1,281 Times in 1,197 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: equential alphanumeric order numbers

Sorry to be critical, but there are several issues with this code:

1. The initial section can be simplified using Nz statements
2. The following line is incorrect:
Code:
If (Me.CboAmount = 0) Then
3. If err 3022 occurs , I think it will keep creating new records in a loop
4. Error handling should normally go at the end of the routine
5. The print section seems over complex (though a separate issue)

Addressing points 1-4, try this:

Code:
Private Sub BtnSubmit_Click()

On Error GoTo Err_Handler

' checking all fields are filled

 If Nz(Me.Shift,"") = "" Then
        MsgBox "Please select the Shift.", vbOKOnly, "Required Data"
            Me.Shift.SetFocus
        Exit Sub
 End If

 If Nz(Me.Location,"") = "" Then
        MsgBox "Please select the Location.", vbOKOnly, "Required Data"
            Me.Location.SetFocus
        Exit Sub
 End If

 If Nz(Me.CboAmount,0) = 0 Then
        MsgBox "Please select the Amount.", vbOKOnly, "Required Data"
            Me.CboAmount.SetFocus
        Exit Sub
 End If

 If Nz((Me.CboNGEmp,"") = "" Then
        MsgBox "Please enter employee's Lic# .", vbOKOnly, "Required Data"
            Me.CboNGEmp.SetFocus
        Exit Sub
 End If

 If Nz(Me.CboCOEmp,"") = "" Then
        MsgBox "Please enter Cashier's Lic#", vbOKOnly, "Required Data"
            Me.CboCOEmp.SetFocus
        Exit Sub
 End If
    
    'Assigns a form number
    Me.TxtFormNo.Value = Nz(DMax("[IssFormNo]", "TblTransactions"), 0) + 1
    DoCmd.RunCommand acCmdSaveRecord

'=================================
'This section seems over complicated
'Printing a form Issue
    DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
    'YES?NO for printout options to reprint document if didn't print
    Dim LResponse As Integer
       LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
      While (LResponse = vbNo)
            DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
            LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
        Wend
     'Going to new record to issue another bank.
    DoCmd.RunCommand acCmdRecordsGoToNew
    Call EnableTab
'=================================
Exit_Handler:
    Exit Sub

Err_Handler:   
    'error handling if form number is already used

If Err.Number = 3022 Then
    Me.TxtFormNo.Value = Nz(DMax("[IssFormNo]", "TblTransactions"), 0) + 1
    DoCmd.RunCommand acCmdSaveRecord
    'Resume Next <== NO - this may cause a repeated loop?
End If
    
   GoTo Exit_Handler <==replacement

End Sub
I expect this can be improved further, but see if that fixes the problem you described
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
donsi (03-13-2018)
Old 04-16-2017, 02:08 PM   #3
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,576
Thanks: 10
Thanked 1,248 Times in 1,188 Posts
MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all
DMax() + 1 does not guarantee uniqueness. Two users might calculate DMax() + 1 at the same time, get the same result, and then save them as dupes. The mistake is not in the code so much as in the table, which should enforce uniqueness on the field, in which case the second user's attempt to save the dupe would have failed.
hth

__________________
formerly known as lagbolt | Windows 10 | Access 2010 | Visual Studio 2013 | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky
MarkK is offline   Reply With Quote
The Following User Says Thank You to MarkK For This Useful Post:
donsi (03-13-2018)
Old 04-16-2017, 02:11 PM   #4
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 11,707
Thanks: 42
Thanked 1,039 Times in 948 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: equential alphanumeric order numbers

Normally that DMax should do the trick. However, your error code is suspicious. Normally when you have an On Error GoTo situation, it jumps completely out of the line and does a Resume to a label. In this case, I could see a problem if you get error 3022 (which I presume is "Duplicate Key"), take the trap, and attempt to update the record number with another DMax+1. However, the first acSaveRecord didn't work (because you got a trap, didn't you?) so the DMax inside the trap will come up with the same answer as the DMax outside the trap.

Further, I'm speculating that there might even be a flow problem. What happens if you take a trap at the first acSaveRecord and the code does a Resume Next afterwards? I wonder if you go through that code a second time NOT as a trap but because it is in-line as the "Next" statement that would be chosen by the Resume Next. I'm not exactly sure when the Err object resets so I don't know if testing Err.Number will get the same number in-line that it got as a trap. I would expect it at least to be possible that you would see an error about "Resume outside of trap" or something similar.

I'm not saying your code is the culprit for the duplicated key, but it might obfuscate your ability to find the true problem.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is online now   Reply With Quote
The Following User Says Thank You to The_Doc_Man For This Useful Post:
donsi (03-13-2018)
Old 03-13-2018, 12:44 PM   #5
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Apologies for reviving the old thread and never able to respond. I was transferred to different location and many other accounting projects was assigned to me so never got back to my pet project. Now I am back and trying to resolve this. I applied your code, but it now doesn't produce the paper receipt at the end of the transaction for the user who encountered the error. I believe, it is due to "Exit_Handler" ending the sub, so it never runs the code to print the job. As far as complicated printout code, I was trying to give an option to the use to reprint if any printer malfunction arises. Maybe it is not the best way to do it, but with my skills, that is all I was able to do. Any suggestion?


Quote:
Originally Posted by ridders View Post
Sorry to be critical, but there are several issues with this code:

1. The initial section can be simplified using Nz statements
2. The following line is incorrect:
Code:
If (Me.CboAmount = 0) Then
3. If err 3022 occurs , I think it will keep creating new records in a loop
4. Error handling should normally go at the end of the routine
5. The print section seems over complex (though a separate issue)

Addressing points 1-4, try this:

Code:
Private Sub BtnSubmit_Click()

On Error GoTo Err_Handler

' checking all fields are filled

 If Nz(Me.Shift,"") = "" Then
        MsgBox "Please select the Shift.", vbOKOnly, "Required Data"
            Me.Shift.SetFocus
        Exit Sub
 End If

 If Nz(Me.Location,"") = "" Then
        MsgBox "Please select the Location.", vbOKOnly, "Required Data"
            Me.Location.SetFocus
        Exit Sub
 End If

 If Nz(Me.CboAmount,0) = 0 Then
        MsgBox "Please select the Amount.", vbOKOnly, "Required Data"
            Me.CboAmount.SetFocus
        Exit Sub
 End If

 If Nz((Me.CboNGEmp,"") = "" Then
        MsgBox "Please enter employee's Lic# .", vbOKOnly, "Required Data"
            Me.CboNGEmp.SetFocus
        Exit Sub
 End If

 If Nz(Me.CboCOEmp,"") = "" Then
        MsgBox "Please enter Cashier's Lic#", vbOKOnly, "Required Data"
            Me.CboCOEmp.SetFocus
        Exit Sub
 End If
    
    'Assigns a form number
    Me.TxtFormNo.Value = Nz(DMax("[IssFormNo]", "TblTransactions"), 0) + 1
    DoCmd.RunCommand acCmdSaveRecord

'=================================
'This section seems over complicated
'Printing a form Issue
    DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
    'YES?NO for printout options to reprint document if didn't print
    Dim LResponse As Integer
       LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
      While (LResponse = vbNo)
            DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
            LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
        Wend
     'Going to new record to issue another bank.
    DoCmd.RunCommand acCmdRecordsGoToNew
    Call EnableTab
'=================================
Exit_Handler:
    Exit Sub

Err_Handler:   
    'error handling if form number is already used

If Err.Number = 3022 Then
    Me.TxtFormNo.Value = Nz(DMax("[IssFormNo]", "TblTransactions"), 0) + 1
    DoCmd.RunCommand acCmdSaveRecord
    'Resume Next <== NO - this may cause a repeated loop?
End If
    
   GoTo Exit_Handler <==replacement

End Sub
I expect this can be improved further, but see if that fixes the problem you described
donsi is offline   Reply With Quote
Old 03-13-2018, 12:45 PM   #6
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Quote:
Originally Posted by MarkK View Post
DMax() + 1 does not guarantee uniqueness. Two users might calculate DMax() + 1 at the same time, get the same result, and then save them as dupes. The mistake is not in the code so much as in the table, which should enforce uniqueness on the field, in which case the second user's attempt to save the dupe would have failed.
hth
Field is set to have unique record thus the error when duplicate number is assigned.
donsi is offline   Reply With Quote
Old 03-13-2018, 12:51 PM   #7
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,576
Thanks: 10
Thanked 1,248 Times in 1,188 Posts
MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all
So handle the error, re-run the DMax() + 1 operation, get a new--unique this time--ID, and re-run the save.
Mark

__________________
formerly known as lagbolt | Windows 10 | Access 2010 | Visual Studio 2013 | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky
MarkK is offline   Reply With Quote
The Following User Says Thank You to MarkK For This Useful Post:
donsi (03-13-2018)
Old 03-13-2018, 01:03 PM   #8
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Quote:
Originally Posted by The_Doc_Man View Post
Normally that DMax should do the trick. However, your error code is suspicious. Normally when you have an On Error GoTo situation, it jumps completely out of the line and does a Resume to a label. In this case, I could see a problem if you get error 3022 (which I presume is "Duplicate Key"), take the trap, and attempt to update the record number with another DMax+1. However, the first acSaveRecord didn't work (because you got a trap, didn't you?) so the DMax inside the trap will come up with the same answer as the DMax outside the trap.

Further, I'm speculating that there might even be a flow problem. What happens if you take a trap at the first acSaveRecord and the code does a Resume Next afterwards? I wonder if you go through that code a second time NOT as a trap but because it is in-line as the "Next" statement that would be chosen by the Resume Next. I'm not exactly sure when the Err object resets so I don't know if testing Err.Number will get the same number in-line that it got as a trap. I would expect it at least to be possible that you would see an error about "Resume outside of trap" or something similar.

I'm not saying your code is the culprit for the duplicated key, but it might obfuscate your ability to find the true problem.

The_Doc_Man, you are right about getting trap for a duplicate Key. I thought putting a trap right after error handling would catch it first before running the rest of the code, and "Resume Next" will resume the running code next in line after the trap (which is a Printout).
donsi is offline   Reply With Quote
Old 03-13-2018, 01:05 PM   #9
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Quote:
Originally Posted by MarkK View Post
So handle the error, re-run the DMax() + 1 operation, get a new--unique this time--ID, and re-run the save.
Mark
That's what I am trying to accomplish by error handler "Problem". But somehow, either its not saving the record correctly or it's duplicating the record.
donsi is offline   Reply With Quote
Old 03-13-2018, 01:41 PM   #10
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,253
Thanks: 77
Thanked 1,281 Times in 1,197 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: equential alphanumeric order numbers

Quote:
Originally Posted by donsi View Post
Apologies for reviving the old thread and never able to respond. I was transferred to different location and many other accounting projects was assigned to me so never got back to my pet project. Now I am back and trying to resolve this. I applied your code, but it now doesn't produce the paper receipt at the end of the transaction for the user who encountered the error. I believe, it is due to "Exit_Handler" ending the sub, so it never runs the code to print the job. As far as complicated printout code, I was trying to give an option to the use to reprint if any printer malfunction arises. Maybe it is not the best way to do it, but with my skills, that is all I was able to do. Any suggestion?
Thanks for the speedy reply. ...
Good to have you back.
What happened to this over the past year whilst you were away?

I haven't read this again in detail but will do so later.
The Exit_Handler code is correct.
Basically if there are no errors the code reaches that point and exits the sub 'gracefully'
However if code errors occur then the Err_Handler section kicks in first
Suggest you clarify what the complex print section is trying to do and i'll look for an easier way of doing it

BUT in the meantime you have other issues to work on that my colleagues have picked up.
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 03-13-2018, 03:39 PM   #11
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Quote:
Originally Posted by ridders View Post
Thanks for the speedy reply. ...
Good to have you back.
What happened to this over the past year whilst you were away?

I haven't read this again in detail but will do so later.
The Exit_Handler code is correct.
Basically if there are no errors the code reaches that point and exits the sub 'gracefully'
However if code errors occur then the Err_Handler section kicks in first
Suggest you clarify what the complex print section is trying to do and i'll look for an easier way of doing it

BUT in the meantime you have other issues to work on that my colleagues have picked up.
Since last year everything went back to manual recording with manual sequential forms and logs.
So I'm still trying to follow and learn VBA. So would I enter GoTo Exit_Handler in the If statement or outside as it is displayed on your code.
Print is noting but a receipt that prints at the end of the transaction for the issuer and receiver to sign. I just want to ensure that receipt is printed and user acknowledges by clicking YES. If it hasn't printed for any reason, user will click NO to reprint the receipt. While loop runs until user clicks YES for "Good Printout". Hope this helps
donsi is offline   Reply With Quote
Old 03-13-2018, 04:01 PM   #12
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,253
Thanks: 77
Thanked 1,281 Times in 1,197 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: equential alphanumeric order numbers

The code below shows standard error handling in use on a button
It goes where I showed you - at the end

Code:
Private Sub cmdBackup_Click()

On Error GoTo Err_Handler

  'all code goes here 

Exit_Handler:
    Exit Sub

Err_Handler:
  'optional line to treat certain errors differently
  '94=invalid use of null, 7874 = table doesn't exist
   If Err = 94 Or Err = 7874 Then Resume Next 
   'otherwise show a message
    MsgBox "Error " & Err.Number & " in cmdBackup_Click procedure: " & Err.Description
    Resume Exit_Handler

End Sub
Not sure its a good idea to loop around repeatedly printing a report.
If it fails once, why should it work the next time or a third time?

However if you want to do it, here's a simpler way:

Code:
PrintReport:
	DoCmd.OpenReport "RptBankFrm", acViewNormal, "", "[IssFormNo]=[Forms]![NavigationForm]![NavigationSubform]![IssFormNo]", acNormal
    
      'option to reprint document if didn't print
       Dim LResponse As String
       LResponse = MsgBox("Did you receive a good printout?", vbYesNo, "Print Out")
       If LResponse = vbNo Then GoTo PrintReport
I've highlighted the filter criteria in RED. Does it work?
Navigation forms & subforms have their own rules and can be tricky to work with.
I never use them - hence the question
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
donsi (03-14-2018)
Old 03-13-2018, 04:50 PM   #13
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Ok I think I understood the logic now. Few reasons to have loop, there one to have user foolproof. Anyways, just to make sure, PrintReort will go between "Exit_Handler" and " Exit Sub", correct??

Where criteria works just fine. That took a long time to figure out, but it is perfectly working.

Thanks for all the help
donsi is offline   Reply With Quote
Old 03-13-2018, 05:03 PM   #14
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,253
Thanks: 77
Thanked 1,281 Times in 1,197 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: equential alphanumeric order numbers

No
Place the PrintReport code above Exit Handler
It is used in place of the section between 2 sets of broken lines =========
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
donsi (03-14-2018)
Old 03-13-2018, 05:26 PM   #15
donsi
Newly Registered User
 
Join Date: Sep 2016
Posts: 59
Thanks: 35
Thanked 1 Time in 1 Post
donsi is on a distinguished road
Re: equential alphanumeric order numbers

Ok. So the flow would be

Code ran without error (number generated )=> Form Printed => Exit
Code ran => error => error handler ( number generated) =>Exit Handler => Exit
On a second scenario, will it go to PrintReopt or would it skip?

donsi is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a sequential alphanumeric record to a table joemennell Forms 1 05-18-2015 12:41 AM
Sequential alphanumeric field greenr Forms 2 01-16-2012 06:13 AM
sequential alphanumeric order numbers Bob100 Forms 18 01-16-2011 09:54 AM
Sequential Order Number with Alphanumeric Value manix Tables 13 05-04-2007 11:08 AM
Placing one field from sequential records in sequential order in a report Ben McCall Reports 8 07-02-2001 03:23 PM




All times are GMT -8. The time now is 06:26 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World