By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

Is it possible to use the DMax fn on multiple fields in multiple domains?

P: 3
Hey. So the problem that I'm running into involves auto-numbering invoice numbers. My boss has 3 tables, 2 of which are only to temporarily store information, but when she goes to create a new invoice number, it doesn't take into consideration all three tables, and therefore she is getting repeat invoice numbers - a real nightmare.

To fix this, I want to code a DMax + 1 function instead of the autonumber, but I am running into the issue of trying to DMax from multiple fields across multiple domains. I've tried running a query with just the invoice numbers and that doesn't help. Is this possible?

Jul 15 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 3,072
You should first consider to redesign the tables.
Only one "production" table with invoices would be the way to go to avoid dupes.

When you can indicate why there are two temp invoice tables, perhaps we can propose a solution.

Jul 15 '10 #2

Expert 5K+
P: 8,701
Are you trying to retrieve a MAXIMUM Inv_ID Number as it relates to e separate Tables, and then increment it by 1? If you are you can let a simple Function do the work for you and return the appropriate Value for you.
Jul 16 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.