Question abt POP form to current record details...

G

Guest

good day all,

I have a frmchecking acct that has ID, DATE, Description, Debit, CRedit,
and the pop up form has Acct Type, Reference, transaction notes.

I created a button to open the form to the current record based on ID, and
for a test I put the field ID visible on the pop up form (frmdetails), but
when the form opens from the current record, the ID Still shows (autonumber)
and doesn't "go to" the current record details?

Here is my code:

Private Sub Command28_Click()
On Error GoTo Err_Command28_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmcheckingAdd/Edit"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command28_Click:
Exit Sub

Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click

End Sub
Any suggestions?

Thanks,

Brook
 
G

Gary Miller

As long as your ID is numeric that should work fine as long
as the form calling it is on a record itself. Your pop-up
form isn't set to be DataEntry by chance, is it? The
(Autonumber) display usually indicates that it is a new
record waiting to be filled in.
 

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