alex

  • Thread starter Thread starter New record
  • Start date Start date
N

New record

Quick question:

I have a form/subform which is linked master/child on
registration_id. The subform allows different test_id for
each registration_id. I.e. registration_id 6000 could
have test_id 42 and test_id 43.

When I open the subform (which allows me to enter the new
test_id), I DON'T want it to pull up old entries against
that registration_id. I still have to have the forms
linked by registration_id though.

Is there a way to achieve this?
 
I would set it up to move to a new record using
DoCmd.GoToRecord , , acNewRec
Depending on how your database is set up, you might want
to have this code set up as a button "New" on the subform,
especially if the end user browses through the records of
the subform to look up old entries. If they do that, you
might also consider arranging your data to have the most
current record show first and the oldest record last.

One final thought, if you set it up to automatically open
up a new record when the form opens, if the end user
closes that form while in the middle of creating a record,
then when they reopen that form it will move straight to a
brand new record again, at which point the end user will
either have to search for the record they were working on
or they will recreate another brand new record and the
half created record is then taking up space in the
database.

Good Luck!
 
Thanks for your reponse.

BTW - how does noe order the subform to show the oldest
records last?
 
Another option, which ensures the security of all your old
data, is to create an unattached form that has simmilar
entry fields to your "real" form and table. When the user
initially enters information in the form, nothing happens
to your table. The user should then press a button
(submit, or enter, etc...) which causes the entries in the
fields on the unattached form to be stored into variables.
These variables, in turn, are stored into the actual table.
You can even prompt a "are you sure" message box before
the variables are actually stored in the table. I find
this much more secure than directly modifying the table,
because it keeps any old entries for being viewed or
modified.

Good Luck!
 
Back
Top