Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dup ID numbers being generated

Status
Not open for further replies.

DMBLuva

Technical User
Jul 16, 2008
27
US
Good Morning,

I created a database about a year ago that generates ID numbers that are unique and have the string "PD-" in front. Here is my coding:

Private Sub CreateNewIssue_Click()
Dim JobIDprefix As String
JobIDprefix = "PD-"

DoCmd.ShowAllRecords 'in case it's filtered
DoCmd.RunCommand acCmdRecordsGoToNew
Me.txtJobID.Value = JobIDprefix & DMax("id", "jobs")

It has worked PERFECTLY except within the last 3 weeks. I have done nothing to this coding to explain why all of a sudden it is creating duplicate numbers. It's having issues right at the runcommand.

Now, we did upgrade a couple months ago from 2003 version to 2007. I wasn't sure if this is what has caused the issue.

Anyone able to help? THANKS IN ADVANCE!!!
 



Hi,

Your MS Access questions will be much better addressed in one of the many MS Access forums like Forum701.

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thanks! I wasn't sure where to post it. I will move it there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top