Potentially simple update question

twoplustwo

Registered User.
Local time
Yesterday, 17:20
Joined
Oct 31, 2007
Messages
507
Hi all,

I have a form that is filtered BeforeUpdate by selecting a company on the primary form then passing the CompanyID to the form that opens.

This displays the selected company details along with a subform for clients against said company.

I am able to edit details for each customer but not the parent company. The form looks for OpenArgs in the BeforeUpdate event with the below code behind a button after selecting a company.

Code:
Private Sub cmdEdit_Click() 'Pull customer name for use in filter
    
    Dim strCustomerID As String
    
    If Not IsNull(Me.lstCompanies.Column(1)) Then
        strCustomerID = Me.lstCompanies.Column(1)
                  
    DoCmd.OpenForm "frmCustomerSiteUpdate", acNormal, , "CustomerID=" & strCustomerID, , acWindowNormal, strCustomerID
    
    End If
    
End Sub

I have allowed data edits in the second form fwiw.

Thanks a lot.
 
It's a bit hard to determine the problem after reading your description. Could you post the relevant part of the database so we can all take a look? Of course you do not have to include the real data ;)
 
Do you mean you want to be able to change the parent company for the customer? I would do this by basing the customer for on a parameter query instead of filtering the form.
 
Hi Neil,

Not really the parent company - just have the ability to change details such as address etc. should the user require to do so.
 
I don't understand. Where are you trying to edit the company details?
 

Users who are viewing this thread

Back
Top Bottom