Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access - Get ID of Subform

Hi

I am using the following code to get the selected ID in the subform shown in the image and open another form with this ID. The first
part works fine but for some reason the "Invoices" form is not opening at that ID

    Dim oID As Long
        oID = Me.Invoices_Summary.Form!ID

    'The following line does not work properly
    DoCmd.OpenForm "Invoices", acNormal, , , acFormPropertySettings, acWindowNormal, oID

Open in new window

Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

at first check that there is a control named ID..
also try this
Form_Invoices.ID
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks Gustav