Selecting a new record from a subform

stretch66

Racing towards the start
Local time
Today, 13:13
Joined
Sep 28, 2005
Messages
72
Hi,

I have a a sub form where records are viewed but need to change the properties to allow edits and data entry.

If there is no current record then the form is not shown and so I need to go to a new record and so was using Using the OnClick Event of a Button on the Main Form.

I have tried the following:

--------------------
DoCmd.GoToRecord , Me.fmLateList, acNewRec

Got Error wrong data type
------------------------

Forms![fmLateEdit]![fmsubLateListEditVersion].Form.AllowEdits = True
Forms![fmLateEdit]![fmsubLateListEditVersion].Form.DataEntry = True
DoCmd.GoToRecord , Me.fmsubLateListEditVersion, acNewRec

Got Error wrong data type
------------------------------

Me.fmsubLateListEditVersion.SetFocus
DoCmd.GoToRecord , , acNewRec

and got a different error which was run time 2195

"You can't go to the specified record"

------------------------------------
Also:

Forms![fmLateEdit]![fmsubLateListEditVersion].Form.AllowEdits = True
Forms![fmLateEdit]![fmsubLateListEditVersion].Form.DataEntry = True
Forms![fmLateEdit]![fmsubLateListEditVersion].Form.AllowAdditions = True
frmSub.Form.SetFocus
DoCmd.GoToRecord , , acNewRec

Still doesn't work!!!!!!!!


Can anyone help please?
 
Perhaps the post here and sample DB will help you on your way. It does concern the DoCmd.FindRecord command but should be equally applicable to the DoCmd.GoToRecord command
 
Hi John,

No still can't get it to work. I have created a test DB if you go to record 3 and then select Add New Record you will see the problem I am having.:confused:
 

Attachments

Users who are viewing this thread

Back
Top Bottom