Creating a new record

  • Thread starter Thread starter Phil Matish, MCSE
  • Start date Start date
P

Phil Matish, MCSE

I have a form that shows a short list of items. To the left of each
one of these items is a command button, that when pressed, takes you
to a much more detailed form. So you have a short list, and when you
click on a command button next to an item, it brings to you to a large
form with more fields relating to this item.

Anyways, when I use the short form to create a new record, then click
the Command button to add more detailed information, I am taken to the
form, but none of the information I entered into the short form
appears in the large form.

To get the database to act correctly, I have to click OUT of the
record on the short form, then back IN the record, THEN click the
command button for the large form to show the correct information.

Here is the code of the cmd button:

-----
Private Sub cmdOpenFullComputerForm_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmComputerandNetworkSettings"
stLinkCriteria = "[tblComputerInformation_ComputerID]=" &
Me![ComputerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub
 
Dan Artuso said:
Hi,
Try adding this line *before* you open the other form.
Me.Dirty = False
If you have the real estate show the list in a list box or subform and
relate that to a subform related to the list.
Selecting or moving will remove the need for the command buttons and save a
step for the user.
The Northwind database has samples.
 
Back
Top