Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-19-2008, 02:24 AM   #1
twoplustwo
Newly Registered User
 
Join Date: Oct 2007
Location: UK
Posts: 507
Thanks: 9
Thanked 3 Times in 3 Posts
twoplustwo is on a distinguished road
Potentially simple update question

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.

twoplustwo is offline   Reply With Quote
Old 05-19-2008, 04:23 AM   #2
ErikSnoek
Programmer
 
ErikSnoek's Avatar
 
Join Date: Apr 2007
Location: The Netherlands
Posts: 100
Thanks: 0
Thanked 1 Time in 1 Post
ErikSnoek is on a distinguished road
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
ErikSnoek is offline   Reply With Quote
Old 05-19-2008, 05:03 AM   #3
neileg
AWF VIP
 
neileg's Avatar
 
Join Date: Dec 2002
Location: Newcastle, England
Posts: 5,975
Thanks: 0
Thanked 8 Times in 8 Posts
neileg has a spectacular aura about neileg has a spectacular aura about
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.

__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones

Cheers, Neil
neileg is offline   Reply With Quote
Old 05-19-2008, 05:37 AM   #4
twoplustwo
Newly Registered User
 
Join Date: Oct 2007
Location: UK
Posts: 507
Thanks: 9
Thanked 3 Times in 3 Posts
twoplustwo is on a distinguished road
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.
twoplustwo is offline   Reply With Quote
Old 05-19-2008, 06:07 AM   #5
neileg
AWF VIP
 
neileg's Avatar
 
Join Date: Dec 2002
Location: Newcastle, England
Posts: 5,975
Thanks: 0
Thanked 8 Times in 8 Posts
neileg has a spectacular aura about neileg has a spectacular aura about
I don't understand. Where are you trying to edit the company details?

__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones

Cheers, Neil
neileg is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VB code to run append and update queries (Simple problem) PTRACER Modules & VBA 23 05-08-2009 09:47 PM
Simple Update UKPATRIOT General 3 02-05-2008 04:18 AM
Simple Update question spectrolab Forms 2 01-04-2008 12:42 AM
Simple Inventory Update from Form bodpod Forms 6 12-01-2006 01:01 PM
Another Update Question clister Tables 1 01-26-2006 12:07 PM




All times are GMT -8. The time now is 09:03 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World