Adding Rows

  • Thread starter Thread starter Floyd Forbes
  • Start date Start date
F

Floyd Forbes

Help Please, I have a form base on a query with this one row of data. How
can
I add five rows with the date increasing by one on each row e.g
8/17/06,8/18/06
8/19/06,8/20/06. Is there a way to use a command button on a form?

Before
ID Name Date Code Time
1 Floyd 8/16/06 VA 8:00

After
1 Floyd 8/16/06 VA 8:00
1 Floyd 8/1706 VA 8:00
1 Floyd 8/18/06 VA 8:00
1 Floyd 8/19/06 VA 8:00
1 Floyd 8/20/06 VA 8:00

How can I go about getting this to work.

Floyd
 
Create a small table of numbers [tblNums] with a single, numeric field [Num]
and 5 records 1-5.
Create a query based on your form's record source and limit it to your
current record. Add tblNums to your query and create an "AfterDate" field
like:
AfterDate: DateAdd("d",[Num], [YourBeforeDate])
Change this to an append query that appends the appropriate fields to your
table.
Save the append query.
Add a button to your form to run the append query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top