Multiple Entries in Single form with common D/T

F

FpwL1399

Hi, I want to create a form where I can enter anywhere from 1-12 unique
entries of 4 fields (say FieldA, FieldB, FieldC, and FieldD) that have
a common date and time. It would be nice if I could have a box where I
can enter an integer from 1-12 and have that many entries available to
me, but this isn't a requirement. Or perhaps a check-box that enables
each entry. I'm having trouble making this work. Any advice is
welcome. Thanks.
 
D

Duane Hookom

You can set up an unbound main form with txtDate and txtTime. Bind a subform
to your table with 4 fields and set the Link Master/Child to the text boxes
(master) and date and time fields (child).
 
F

FpwL1399

Well, I don't really understand what you mean by that because I'm not
very experienced with Access. I've only just started using it in the
past couple weeks. I've tried using a sub form that allows a go to
next entry button in it, but i keep getting an error message that says
I'm creating duplicate entries. haven't figured out how to get rid of
that yet.
 
D

Duane Hookom

Apparently you have a table.
1) Create a new, blank form.
2) While in design view of the form, drag your table from the database
window onto the form.
3) Resize the new subform control to fairly wide and high.
4) Add a text box named txtDate to the main form
5) Add a text box name txtTime to the main form
6) View the properties of the subform control
7) Set the Link Master property to
Link Master Fields: txtDate, txtTime
8) set the Link Child property to
Link Child Fields: [DateFieldName],[TimeFieldName]
If you are storing Date and Time in a single field change the above:
4) Add a text box named txtDateTime to the main form
5) nothing to do
6) View the properties of the subform control
7) Set the Link Master property to
Link Master Fields: txtDateTime
8) set the Link Child property to
Link Child Fields: [DateTimeFieldName]
Now, when you view the form, you can enter a datetime value into the text
box and any record added in the subform will have that same datetime value
in the DateTimeFieldName.
 
F

FpwL1399

Okay, maybe I wasn't exactly explicit with my initial post. I want to
be able to write in up to 12 unique entries of four fields...but all at
the same time. I don't want the operators to have to do each entry
individually.

Duane said:
Apparently you have a table.
1) Create a new, blank form.
2) While in design view of the form, drag your table from the database
window onto the form.
3) Resize the new subform control to fairly wide and high.
4) Add a text box named txtDate to the main form
5) Add a text box name txtTime to the main form
6) View the properties of the subform control
7) Set the Link Master property to
Link Master Fields: txtDate, txtTime
8) set the Link Child property to
Link Child Fields: [DateFieldName],[TimeFieldName]
If you are storing Date and Time in a single field change the above:
4) Add a text box named txtDateTime to the main form
5) nothing to do
6) View the properties of the subform control
7) Set the Link Master property to
Link Master Fields: txtDateTime
8) set the Link Child property to
Link Child Fields: [DateTimeFieldName]
Now, when you view the form, you can enter a datetime value into the text
box and any record added in the subform will have that same datetime value
in the DateTimeFieldName.

--
Duane Hookom
MS Access MVP



FpwL1399 said:
Well, I don't really understand what you mean by that because I'm not
very experienced with Access. I've only just started using it in the
past couple weeks. I've tried using a sub form that allows a go to
next entry button in it, but i keep getting an error message that says
I'm creating duplicate entries. haven't figured out how to get rid of
that yet.
 
D

Duane Hookom

Append 12 records with the date/time from the form using code. Then require
the subform to display the new records.

--
Duane Hookom
MS Access MVP

FpwL1399 said:
Okay, maybe I wasn't exactly explicit with my initial post. I want to
be able to write in up to 12 unique entries of four fields...but all at
the same time. I don't want the operators to have to do each entry
individually.

Duane said:
Apparently you have a table.
1) Create a new, blank form.
2) While in design view of the form, drag your table from the database
window onto the form.
3) Resize the new subform control to fairly wide and high.
4) Add a text box named txtDate to the main form
5) Add a text box name txtTime to the main form
6) View the properties of the subform control
7) Set the Link Master property to
Link Master Fields: txtDate, txtTime
8) set the Link Child property to
Link Child Fields: [DateFieldName],[TimeFieldName]
If you are storing Date and Time in a single field change the above:
4) Add a text box named txtDateTime to the main form
5) nothing to do
6) View the properties of the subform control
7) Set the Link Master property to
Link Master Fields: txtDateTime
8) set the Link Child property to
Link Child Fields: [DateTimeFieldName]
Now, when you view the form, you can enter a datetime value into the
text
box and any record added in the subform will have that same datetime
value
in the DateTimeFieldName.

--
Duane Hookom
MS Access MVP



FpwL1399 said:
Well, I don't really understand what you mean by that because I'm not
very experienced with Access. I've only just started using it in the
past couple weeks. I've tried using a sub form that allows a go to
next entry button in it, but i keep getting an error message that says
I'm creating duplicate entries. haven't figured out how to get rid of
that yet.


Duane Hookom wrote:
You can set up an unbound main form with txtDate and txtTime. Bind a
subform
to your table with 4 fields and set the Link Master/Child to the text
boxes
(master) and date and time fields (child).

--
Duane Hookom
MS Access MVP

Hi, I want to create a form where I can enter anywhere from 1-12
unique
entries of 4 fields (say FieldA, FieldB, FieldC, and FieldD) that
have
a common date and time. It would be nice if I could have a box
where I
can enter an integer from 1-12 and have that many entries available
to
me, but this isn't a requirement. Or perhaps a check-box that
enables
each entry. I'm having trouble making this work. Any advice is
welcome. Thanks.
 

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

Top