vgersghost
Vgersghost
- Local time
- Today, 17:25
- Joined
- Apr 29, 2005
- Messages
- 106
Randomize (957426813)
Me.txtInvoice = CDate2Julian(Date) & MyYear & (Int((14035 + 1) * Rnd + 3))
Me.txtInvoice = Me.txtInvoice + Me.cboAcctNo + 3
These lines of code are in my program to generate a random invoice number after a data is enter in another combo box. It does okay at generating a random number, but the problem I have is when I closed out of the database, and reopen it and generate an invoice I get the exact same sequence of random numbers. Running Access 2003. I have tried different approaches, Randomize (now()), (Rnd(456) * rnd(984)), adding two lines of the exact same code. The program still ends up generating the same sequence of invoice numbers after closing and opening the database.
Any ideas on how to solve this problem?
Me.txtInvoice = CDate2Julian(Date) & MyYear & (Int((14035 + 1) * Rnd + 3))
Me.txtInvoice = Me.txtInvoice + Me.cboAcctNo + 3
These lines of code are in my program to generate a random invoice number after a data is enter in another combo box. It does okay at generating a random number, but the problem I have is when I closed out of the database, and reopen it and generate an invoice I get the exact same sequence of random numbers. Running Access 2003. I have tried different approaches, Randomize (now()), (Rnd(456) * rnd(984)), adding two lines of the exact same code. The program still ends up generating the same sequence of invoice numbers after closing and opening the database.
Any ideas on how to solve this problem?