Do these numbers have to be consecutive and in chronological order? Suppose you auto-enter a serial number on creation, but "activate" it only when printed, e.g.:
SerialID Created Printed YourSerialNumber
1 1/1/2009 00:01 1/1/2009 02:15 1
2 1/1/2009 01:05 1/1/2009 01:30 2
3 1/1/2009 02:30
4 1/1/2009 03:45 1/1/2009 03:55 4
Not quite sure what you are saying, we just need the generated serial number to be only entered in the field upon clicking of the print from button. No date or time of printing is needed, and the number to go up by one each time the print form button is clicked.
It may be 2, 3, or more days in between before we need to print this form out again. It is a Rescue Activation Number eg: 1701 means that this is the 1701 rescues we have activated. Hopes that helps.
Print button =
Print [ ]
Set Field [Serial] [Max(Serai) +1 ]
I am just trying to understand the situation a litttle better, because what you are asking for is not simple at all - it would be better to find some other arrangement. So please elaborate why the number should be assigned only when printed, why would these be printed out of order (or perhaps not at all?), and so on.
We are a Volunteer Marine Rescue that assist vessels in distress, broken down or in danger of sinking etc. We have a Membership Database that is linked to our Radio Log Database the form when it get printed is given to our Rescue Boat Skipper, it containt information on the boat that needs our help. The activation number is a record number for that vessel and for us to know how many vessels we have assisted in total.
I"m still not sure I understand this. It seems you should have three tables: Vessels, Log and Rescues. When an incident logged in the Log table requires a rescue activity, a new record should be created in the Rescues table. But that is just a guess, because I don't really understand your description.
If you posted an example walking us through what you want to see happen, when and why, it might help to visualize the issue.
Sorry if I am not explaining it properly I will start from the beginning.
We have 2 Databases, 1st database is VMR Membership, it has 12 Layouts, it holds all the boat owners details, membership renewal forms, membership cards, address labels etc.
2nd Database is the Radio Log, it has 7 layouts, Radio Calls, (boats that have logged on with us and where they are going for the day and when they are due back,) local weather, local tides, local radar, vessel assist, (the layout is only printed if a boat needs assistance)
Now when we enter a new radio call that information is automatically entered into the Vessel Assist via fields like boat rego, member number, mobile phone, emergency contacts etc, if we have 15 radio log calls we will have 15 vessel assist logs.
The Vessel Assist Activation Number needs to only be generated in the vessel assist activation number field on the Vessel Assist layout when we need to print out the Vessel Assist layout to give the rescue boat there details.
The vessel assist activation number is a number that we share with the likes of the water police, search and rescue, ambulance and lets us keep a total of how many rescues we have made.
Basically it is just a number that needs to be generated only when the layout is printed.
I hope this will clear up things.
If I understand your last post, the "activation number" needs to be unique but it need not be sequential.
In other words, if you generated 5 activation numbers in one day and they read like this:
The numbers would be acceptable as long as there are no duplicates. If so, scroll back up to Comment's suggestion of setting up a serial number but keeping it hidden until a button is clicked to print out the report.
If does not work for you tell us why.
The thing is the numbers do need to be sequential
That's why I asked for clarification as your last post didn't make that completely clear. :smileywink:
Here's a method I worked out with another poster:
Define a new table, Activations, with two fields
Activation (auto-entered serial number)
You should already have a serial ID number in you "Vessel Assist" Table. If not, create one. I'm making up table and field names here so be sure and substitute what actually exist in your tables:
Make a relationship:
VesselAssists::AssistID = Activations::AssistID (enable allow creation of records... for the Activations table)
Now, to assign a sequential activation number when a script (such as by clicking a print button) is performed, put the following single step in your script:
Set Field [Activations::AssistID; VesselAssists::AssistID]
Place the Activations::Activation field on your layout and you'll see a unique, sequential serial number appear in it the first time the above script step is performed.
Hello PhilmodJunk, i thankyou for your time but i just can't seem to get this to work i must be doing something wrong. Is there any chance you can explain this step by step i am a dummy when it comes to this, have been trying all day with no luck.
Let's start with a list of your actual tables and fields involved to make the example clearer.
Can you provide me with the name of your table you base your Vessel Assist layout on?
Do you have a serial ID number field in this table? If so, its name is...?
Thanks for this PhilModJunk,
The Layout is named: Vessel Assist (it is one of the layouts in the Radio Log Database)
The field is named: Vessel Activation Number