By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,182 Members | 1,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,182 IT Pros & Developers. It's quick & easy.

Help with code for Access 2007

P: 1
Please excuse me i am new at doing code for access and i am trying to teach myself, i have a form of which is also linked to a query for company contacts. in the form when the shipper is being entered it will query from the query of company contacts when the correct company name is selected i would like to have the form populate the shipper contact name, phone, address, city, state and any attachments that have previously being saved the shipper name is a combo box on the form and found the query i need for the form to generate the other information and i believe that i need to add a code to each field to have the informaiton popluate but i think i have something wrong because the query will work but not the code here is the code i have please let me know if i am going about it all wrong or if am just missing something.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Shipper_Contact_BeforeUpdate(Cancel As Integer)
  2. db As Recordset
  3.     rs
  4.         SELECT CompanyContacts.Business_Phone & _
  5.         FROM CompanyContacts & _
  6.         WHERE(((CompanyContacts.Company) = [Forms]![TripInfo Form]![Shipper]))
  8. End Sub
thanks in advance
Jul 15 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

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