Using multiple Forms on one Table

  • Thread starter Thread starter Chip Melton
  • Start date Start date
C

Chip Melton

I have a large table with over 100 fields for an Inspection checklist but i
am trying to use 3 different forms to input the data to help the user but i
am trying to use a botton to jump from one Form to another while remaining
on
the same record and i am using the primary keys as filter criteria in the
button. but when i jump to the next form it tries to create a new record and
gives me a duplicate PK error. How do i keep the form on the same record so
that it is just a continuation of the same record? Here is the code i use
in the button:

Private Sub Command14_Click()
On Error GoTo Err_Command14_Click

stDocName = "frm_SAV1"
stLinkCriteria = "(SAVNUM=" & Me!SAVNUM & ") and (SAVDATE=" &
Me!SAVDATE & ")"

If Not Me.SAVDATE Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!frm_sav1!FACID = Me!FACID
Forms!frm_sav1!SAVDATE = Me!SAVDATE
Else
MsgBox "Input SAV Date before continuing!"

If someone can help, Please do. I am very weak in VB so be gentle...
THANKS IN ADVANCE!!!!
 
Chip- i use a tabbed form with multiple pages for lengthly data entry - in
the after update of the last control on each page set focus to the next
page - you can also control whether the pages are/arenot visible.
 
Back
Top