VBA code is not working on an Order Form which contains two subforms (1 Viewer)

wire_jp

Registered User.
Local time
Today, 00:01
Joined
Jun 23, 2014
Messages
64
Hello,


I have created a frmOrders which contains two subforms - fsubOrderDetails and fsubOrderLink. If I advance forward in the form - frmOrders - from one customer to the next customer, the form do not show the specific order details which relate to the specific customer. Can you assist me in fixing the VBA code of these forms (parent form and subforms)? The database is attached.

How do I make the form editable so that the user can add new records to the form?

Your help in fixing these problems is greatly appreciated.


Kind regards

https://onedrive.live.com/redir?resid=98C037886F3C9DD3!1762&authkey=!ALtNGez0M22mTdc&ithint=file%2caccdb
 
Last edited:

Ranman256

Well-known member
Local time
Today, 03:01
Joined
Apr 9, 2015
Messages
4,337
You don't need code....
Set Each subForm link properties to the master form key.
Master key =clientID
SubForm key= clientID.

They will sync.
 

wire_jp

Registered User.
Local time
Today, 00:01
Joined
Jun 23, 2014
Messages
64
Hello,

Thank you for the help. How do you make the parent form (frmOrders) and subform (i.e fsubOrderDetails), editable so that a user can add new records automatically. I would like to jump to a new record in the parent form. When I try to add information in a new record, the fields are in read-only mode and they are not editable. If I open a new record in the parent form, I try to enter a new customer name, I am unable to enter any information. The updated database is attached.

In the form parent form, I created a new public method:
Code:
Public Sub MoveToNextRecord()
    DoCmd.GoToRecord acDataForm, Me.Name, acNext
End Sub

In the form Child, I called the method with:

Code:
Parent.MoveToNextRecord

https://onedrive.live.com/redir?resid=98C037886F3C9DD3!1765&authkey=!AJlnDdne6iaa5xE&ithint=file%2caccdb

Kind regards
Code:
 
Last edited:

Users who are viewing this thread

Top Bottom