|
-
Jun 15th, 2006, 02:50 AM
#1
Thread Starter
New Member
Generate Auto-number in Network Environment
hi all
plz help me .... so confusing.....
i wanna generate a receipt number .... i got four computers that running at one time which refer to a server comp where the dbase is located... what im doing now is i read the highest number frm the dbase then i plus with 1.... but the prob is all those four computers wil have the same number n now i got redundant receipt number which is realy incorrect....
so i wanna ask frm u guys how to solve this matter so that if the current highest receipt no in the dbase in 100 so the 1st comp wil have 101, 2nd comp wil have 102, 3rd comp wil have 103 n 4th comp wil have 104 ... NOT 101...!
System: VB 6.0
Dbase: MS Access 2000
plz guys .... realy apreciate it..... thans a lot.....
-
Jun 15th, 2006, 05:12 AM
#2
Addicted Member
Re: Generate Auto-number in Network Environment
Looks difficult. Why the receipt number is needed at the computer 1..4 etc
You can do the calculation at the time of inserting records anyways.
Event using Identity column can solve this problem
-
Jun 15th, 2006, 08:22 AM
#3
Re: Generate Auto-number in Network Environment
 Originally Posted by mayurvb
Looks difficult. Why the receipt number is needed at the computer 1..4 etc
You can do the calculation at the time of inserting records anyways.
Event using Identity column can solve this problem
I don't know if Acess supports IDENTITY, but, you can create an AutoNumber field which will auto increment on each INSERT and provide a unique number which can be used for your receipts.
-
Jun 15th, 2006, 09:05 AM
#4
Re: Generate Auto-number in Network Environment
Yes, Access does support Identity but its limited.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|