report printing (1 Viewer)

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
Re: autonumber..........aarrggghhh

After trawling the internet i have come to the conclusion that this cant be done. gutted. spent so much time building it and cant use it. i think i built it wrong from the start. i didnt think access was so restricted. back to the drawing board. thanks for trying to help though. i now have learned what not to do. lol
 

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
Re: autonumber..........aarrggghhh

i now hate access. and the internet......and everyone around me
 

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
Re: autonumber..........aarrggghhh

another day wasted.........................
 

speakers_86

Registered User.
Local time
Today, 02:28
Joined
May 17, 2007
Messages
1,919
Re: autonumber..........aarrggghhh

I'm sure it can be done. I have to go to work, so I can't help much now, but have patience, young grasshopper. It would help if you would post your database.

i have created a table with customer details, name, address, car reg, etc. within this table is a field called addressID which is the primary key and is an auto number.

So your saying that inside tblCustomers, you have a field called AddressID, and it is an autonumber? Can a customer have more than one address? You also said there is a field for car reg (registration?). What is the purpose of your program? If this is for a mechanics garage, you might not care about your customer's past addresses.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:28
Joined
Jan 20, 2009
Messages
12,863
Re: autonumber..........aarrggghhh

Keep a number in a table. Read and increment the number when you print the report.

Otherwise you could simply use a random number. Check out the Rnd() function.
 

vbaInet

AWF VIP
Local time
Today, 07:28
Joined
Jan 22, 2010
Messages
26,374
Re: autonumber..........aarrggghhh

Keep a number in a table. Read and increment the number when you print the report.
Precisely what I advised in another thread created by the OP. It looks like the thread has been deleted and I will get the Moderators to look into this.
 

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
hi speakers_86. yes in my table i have addressid set as auto number and as the primary key. i created a form from this table and from this i print out a job sheet. the job sheet printed as everything on it we need. its perfect, except.....i would like the report to have a job number. nothing in my form or table, just a job number printed on my report. starting from 1, 100 or 1000 it does not matter as long as the next printed job sheet has the next number in the sequence. 2, 101 or 1001. i dont need to keep a log of these numbers as the finished sheet gets put in a filling case, which are currently stored under job number. the database is just a quick way for me to produce the job sheet. if we need to check something on the job sheet in the future, we just pull out the job card.
thanks
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:28
Joined
Jan 20, 2009
Messages
12,863
.....i would like the report to have a job number. nothing in my form or table, just a job number printed on my report. starting from 1, 100 or 1000 it does not matter as long as the next printed job sheet has the next number in the sequence. 2, 101 or 1001. i dont need to keep a log of these numbers ...

How on Earth do you expect Access to know what number it should use next without anything recorded in the database? Walk to the filing cabinet and check the last one? :rolleyes:
 

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
so i need to create a separate table to store the job numbers? just like to add that i am a newbie..............
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 16:28
Joined
Jan 20, 2009
Messages
12,863
Many programs have tables for storing information, particularly about default settings. There are techniques to potentially hold all that information in one table. However one of the arts of programming is managing this kind of data and there is considerable variety approaches.

I have used single record, single field tables for just such a purpose as you have described.
 

vbaInet

AWF VIP
Local time
Today, 07:28
Joined
Jan 22, 2010
Messages
26,374
You use DMax() to get the next number in the sequence, just reiterating. But you will first of all need to increment it in the DB before fetching the last ID in the table.
 

vbaInet

AWF VIP
Local time
Today, 07:28
Joined
Jan 22, 2010
Messages
26,374
Before I can tell you why, perhaps we should get this clarified. Should the ID be unique for all users or just for an individual user? What I mean is, if user A prints 2 reports with IDs of 100 and 101, is it also allowed for user B to print 2 reports with the same ID? Or must it be unique for both users?
 

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
it must be a unique number whenever the record is printed. quite simply when i press the print button that produces my report i want a number printed on it. nothing to do with customer id.
 

vbaInet

AWF VIP
Local time
Today, 07:28
Joined
Jan 22, 2010
Messages
26,374
Please re-read the scenario, I'm talking about users, not CustomerID.
 

accessissofrustratin

Registered User.
Local time
Yesterday, 23:28
Joined
Aug 13, 2012
Messages
31
lifes to short................................................teach a man to fish i understand but come on.
 
Last edited:

Accessensible

New member
Local time
Today, 08:28
Joined
Sep 6, 2012
Messages
4
As you already have a table for your job numbers (not autonumber), use SQL in "ON LOAD" event of your report to get max(jobnumer)+1 from the table and insert this new number into the table for the next user.
 

Users who are viewing this thread

Top Bottom