Several forms linked to one table

G

Guest

Hi,

I want to create a database which has several forms in it but with only a
few fields in each and linking in between by command buttons.....here is what
I need

First form - details are entered in each field
click command button takes you to another form (same record)
Second form - details are entered in each field
click command button takes you to another form (same record)

and so on. The purpose of this is to make data entry for the user as simple
as possible without a multitude of fields on one form. It also needs to
maintain the one record throughout all the forms. I've tried a tab control
but there is a lot of fields in the database and there are way too many tabs.

I hope I've explained myself clearly. Hope someone can get me started!!!
 
T

tina

more than 25-30 fields in a table is usually a good sign that the table is
*not* normalized. my first recommendation would be that you review your
table(s)/relationships structure.

having said that, my next recommendation would be that a TabControl is a
better solution to the need for more "screen real estate", as opposed to
opening multiple forms to edit a single record.

having said that, you can probably do what you're asking by adding code to
the first form's command button to save the current record, and then filter
the next form by the primary key, as

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenForm "NextFormName", , , "PrimaryKeyField = " _
& Me!PrimaryKeyField

note that if the primary key field is a Text data type rather than Number,
you need to enclose the value in quotes, as

DoCmd.OpenForm "NextFormName", , , "PrimaryKeyField = '" _
& Me!PrimaryKeyField & "'"

also note that you must explicitly save the current record before opening
the next form, otherwise you're going to run into "write conflict" problems.

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

Top