473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to update related fields in two tables by one combo

Thanks again jim, sorry to bother you. i,m working on this data base now so lets try it here.the data base name is 'qualityfoam' the two tables i,m working with from the database are [proforma invoices] and [suppliers] so some users want to update invoice details before adding a supplier name. the field shared between the two tables is [supplier name]. i have tried the code you gave me but got error. the following is what i typed in the code section;

Expand|Select|Wrap|Line Numbers
  1. Private Sub Supplier_AfterUpdate()
  2. Dim dbs As Qualityfoam.Database
  3. Dim rsSuppliers As Qualityfoam.Recordset
  4.  On Error GoTo ErrorStuff
  5. Set dbs = CurrentDb
  6. Set rsProducts = dbs.OpenRecordset("tblsuppliers", dbOpenDynaset, dbSeeChanges)
  7. rsSuppliers.AddNew
  8. rsSuppliers![supplier ID] = Me!newsupplierid
  9. rsSuppliers![supplier name] = Me!newsuppliername
  10. rsSuppliers![other stuff as needed] = Me!othernewstuff
  11. rsSuppliers.Update
  12.  
  13. rsSuppliers.Close
  14. Set rsSuppliers = Nothing
  15. Set dbs = Nothing
  16.  
  17. Exit Sub
  18.  
  19. ErrorStuff: Resume Next 
  20.  
kindly help me jim or any other expert.
Jun 25 '10 #1
0 957

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Hanuman | last post by:
Hi, On the IBM host we use a product called RDX that lets us copy "related" table data from the QA and prod environments to our UT environments. For example if we provide a CustomerID as input...
2
by: Smythe32 | last post by:
Hi, I have this code below that will add a new item to a combo box if it is not in the combo box. I also would like the user to add the description for the new addition to the combo box and...
2
by: Antanas | last post by:
I applied FP9a on top DB2 UDB 8 FP8. Now I notice in Control Center to get this error: CLI0611E Invalid column name. SQLSTATE=S0022 when I slelect any table then Show Related->Tables Spaces. Is...
4
by: mailing | last post by:
Hi All, I have a Main form which has many different tables/Queries linked to it. No problem to create individual field using combo box with pull down list. How do I create 2 related fields in...
1
by: kelly623 | last post by:
I have a combo box to select a client name and then it fills in the rest of their information (address, city, state, phone, etc.) Each field is bound to the table where the information is stored. ...
1
by: girjer | last post by:
I want to populate two table fields on a selection of either combo box, list box or any option button. For e.g. When I select 'YES' as an option I want to populate two fields in the table i.e....
3
by: Garrystone | last post by:
Hi all, I am having difficulty adding to a lookup table; I want to be able to use a combo box to enter predefined values in a form/table, but also enter new values in that combo box. The dificulty...
1
by: hawk7890 | last post by:
I created an access database using access 2003 with lookup tables and I am having isues where my combo boxes on the form update the lookup table instead of the master table. I have a query to my...
4
by: Meddix | last post by:
Hi Everyone, I am new to C#, kind of new to programming altogether. It is something I am really enjoy learning but I am a little stuck with hierarchical updates. I am using Visual Studio 2008...
7
by: RG360 | last post by:
Hello. I am new in Access and I need assistance from Pro's I have a data entry form from 2 main tables and they have relationships with other tables. My main table only contains Field ID's,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.