Generating Records

Bears84

Registered User.
Local time
Today, 12:13
Joined
Dec 12, 2005
Messages
25
I am trying to copy a field multiple times based on a number in an unbound field on a form. As well attach a consecutive number base on the number enter in the unbound text box.
Like this
[Table1] . [Field 1]

A70-3886-01
A70-7003-01

copy this many times unbound text box on form in to 3


[table2] . [Field1]
Spool Number
A70-3886-01-01
A70-3886-01-02
A70-3886-01-03
A70-7003-01-01
A70-7003-01-02
A70-7003-01-03
 
Look up "Do" & "Loop" in VBA help.

The code will need to be run from a form. You may need extra fields to denote the extra data you use to construct the string.

Dave

PS can you post a sample of your Db for us to work with?
 
Bears84 said:
I am trying to copy a field multiple times based on a number in an unbound field on a form. As well attach a consecutive number base on the number enter in the unbound text box.
Like this
[Table1] . [Field 1]

A70-3886-01
A70-7003-01

You say "based on the number entered in the unbound text box". Then show records in table1.field1 ???
 
Ok I have a limited amount of experance with more like none other than what someone here has tried to show me. That just enough to get me started and unable to get were I would like. I have up loaded a sample of the data base. I would like to enter the information on the form and then have the button copy the information to the Sheet table andf I'll try and work with it from there. By repeating the process to do spool numbers etc.
 

Attachments

After looking at your Db, you are very close. You need to reference DAO3.6 and add one extra line of code to keep relationships correct.

Also, do you want to loop through the entrie recordset, or only update the displayed record?

Have attached Db that runs through entire recordset.

Dave
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom