adding multiple rows of info

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Could anyone tell me the best way to set this up-
I have to create a database that (to start with) has 2 pieces of information.
1) Report Name (a string name)
2) Step in Producing the report (a string description- can have many steps
to 1 report name)

I know how to create a form but what I would like to do is be able to select
the Report Name and then add a step(creating a record in row 1), then add
another step for the same report (creating record in row 2) without
reselecting the report name control.

Any help would be greatly appreciated!
TIA!
 
start with proper table design; in this case, two tables:

tblReports
ReportID (primary key)
ReportName
(any other fields you need to describe the report as an entity)

tblReportSteps
StepID (primary key)
ReportID (foreign key from tblReports)
StepDescription
(any other fields you need to describe a specific step for a specific
report)

tblReports has a one-to-many relationship with tblReportSteps. link the
tables in the Relationships window, *from* tblReports *to* tblReportSteps,
on the common field ReportID.
having set up your tables correctly, you're ready to create the forms for
data entry. standard setup is a main form bound to tblReports, with a
subform bound to tblReportSteps. link the two forms in the mainform design
view, on the subform control's LinkChildFields/LinkMasterFields properties,
using the common field ReportID. enter a report ID and report name in the
main form; when you move to the subform and begin entering related records,
the ReportID field in each record of the subform will be populated
automatically - matching the report ID in the main form record.

(note: if you have *standard* steps used to complete reports, you can
define them in a third table - tblSteps. in that case, tblReportSteps would
be a linking table between tblReports and tblSteps; one report can have many
steps, and one step can be used in many reports. the table and form setup is
somewhat different; post back if you want more detail.)

hth
 

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