reserve multiple records

wolf10851

Registered User.
Local time
Today, 11:44
Joined
May 30, 2013
Messages
24
I have a DB that we track our wires in the building where they are going from and to. When we are adding new equipment we need to reserve a group of numbers so we can label our wires then input the data at a later time. Obviously we can't have 2 different wired with the same number or that would create havoc. In the past we would just pull a group of numbers out of thin air and see if that range was in use but that has created huge gaps in our numbering. The DB that I have we can look up gaps in numbers so we can utilize those numbers. what I am having issues with is being able to reserve the numbers in 1 shot instead of having to go in and create a new record individually for each wire number. Any help would be useful as I have been searching for 3 days just trying to figure this out. Sadly I don't know much about Access but everyone else here knows even less

I tried to add a link to dropbox where the DB is located but my post count is too low at the moment
 
ok unfortunately like I said before I am not that good with access but I am learning. In trying to decipher and "reverse engineer" what you posted so I can make it work in my DB I got stuck in a couple of places. so to test this I created the most basic DB just to make sure it would work

what I created is a table with 3 fields an ID field which is a autonumber field then I created WireID and Status on the form I created a text box labeled startnum which is unbound and a textbox labeled WireID and bound to the WireID field then created a button with the code that you posted.

after that I get a message stating compile error method or data member not found and it has
.StartNum highlighted. I am sure I did something wrong but not exactly sure what. Any help you could provide would be greatly appreciated!
 
Enter StartNum=1 and put a single quote ' in front of the Startnum=me.startnum


Dale
 
ok the good news is the single quote allows the script to run. the bad news is that nothing happens in the table!

ok I didn't refresh! :(
but what happens is under starting number I put in 20
and under wire number I put in 40
and there was only 1 record created with wire number being 40

Edit: typing that out I realized that this does not work for what I am trying to do using the example above what should be happening is I start at wire number 40 and create 20 new records with wire 41, and status is reserved 42, status: reserved.....wire 58 status reserved etc
 
Last edited:
Yes, I can see that it wouldn't.
Pat's code looks good however he did not leave us some variables.
The code needs to know what the ReserveCount is.
I am sure he had an idea where he was going with this, however I am not sure what to do.

Can you upload you database.

Dale
 
Yes, I can see that it wouldn't.
Pat's code looks good however he did not leave us some variables.
The code needs to know what the ReserveCount is.
I am sure he had an idea where he was going with this, however I am not sure what to do.

Can you upload you database.

Dale
in about 3 more posts I can add a link to my DB but I have no idea how to even get a DB to be only 2mb as per the sites requirements!
 
You zip it.
Right click the file and send it to zip.

Post back.
Dale
 
I deleted all the records and extrA forms and zipped it up it was still 6mb which still exceeds the 2 mb limit for a zip file. Then I uploaded it to Dropbox and that's when I found out about the 10 post minimum for adding a link :(
 
You are at 8 posts now.
compress and repair.

Dale
 
9 posts.
What all do you have in that thing?

Dale
 
Getting from something called DropBox.
Dale
 
ya dropbox is a service that allows you to upload files for others to be able to download. the DB is called sample.mdb
 
Got it.

You table is a mess.
Let me nose around.

almost 11:00 pm here. What time is there?

Dale
 
In the wire Number field, is the the Number of the wire?
What is that number for?
How many wires will you have total?

Dale
 
it is 8:00 here. I am in California.

the sample BD I deleted out most of the wires just to make it a little smaller. we have over 10k wires here at the station. as for the wire number itself we put the number on each end of the wire when we pull it so we can look up where the wire is going in like 6 months when we have to troubleshoot an issue
 
Edit: typing that out I realized that this does not work for what I am trying to do using the example above what should be happening is I start at wire number 40 and create 20 new records with wire 41, and status is reserved 42, status: reserved.....wire 58 status reserved etc

You need to start at wire 40 and continue to wire 10,000.
Some of these wires are used. Correct?
Are you rewiring the station or is it a new station?

Dale
 

Users who are viewing this thread

Back
Top Bottom