473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with code for Access 2007

1 New Member
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]))
  7.  
  8. End Sub
thanks in advance
Beverly
Jul 15 '07 #1
0 1145

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

Similar topics

5
by: JasonP | last post by:
I am using Access 2003 on Windows XP. I am looking to analyse web traffic files using this - I appreciate there are bespoke applications which will do the same task. Each month there are roughly...
3
by: Michael | last post by:
I work with a highly programmed Access database (some 15,000 lines of VBA code, much of it automating data entry on forms -- and believe me, it's very tight code). In Access 97, 2000, 2002, and...
1
by: heckstein | last post by:
I am running a query in Access 2003 to pull training courses with a start date that falls within a specified date span such 2/1/07 to 2/28/07. I was using this code - (( I.STARTDATE) Between...
8
by: saladinator | last post by:
I have created an Excel spreadsheet that has a lot of data. What I want to do is import the spreedsheet to Access and create a form so that I can print each row per page in a proffessional manner....
3
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to...
1
by: flyguide7 | last post by:
I had to get a new computer this week and I have been running Paradox for the last 6 years, now I have to use Access 2007. Now forgive me if this question has been asked a million times hence but...
3
by: cwoll | last post by:
Hi I need help. I have a ms access 2003 database that I would like to upgrade to ms access 2007. The first time I opened I had to fix a few references it wanted a DAO2535.TLB file witch I gave it,...
1
by: gcattley | last post by:
I can see why this doen't work in a simple query, but I don't know how to fix it... I have a table of client transactions, (ACCOUNT_NUMBER, DATE, VALUE) eg: 12345, 01-12-2007, 30 12345,...
1
by: ARC | last post by:
I think I made a major blunder, and now Access 2007 no longer opens. I made the mistake yesterday of using the "test" option in wise installer for my Access 2007 runtime app. It actually installed...
5
by: mturner64 | last post by:
I am developing an application using asp.net where a user can enter first name, last name, donation amount, date, et cetera. After the user enters the information and clicks submit, the information...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.