If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to auto fill info. from a table to a form?
If I have a table with customers information and want to automatically fill
in some of the info. on an order form, how do I tell access to auto fill that info? |
#2
|
|||
|
|||
here is a sub i used to auto fill 2 other text boxes when
some enter a PO in the PO txtbox. has quallifiers too. Maybe you can use it as a template or maybe get some ideas. delete all of my field names and tables and add in yours. It uses the dLookup function. syntax: dlookup("[field1]","table","[field2]='" & me.control & "'" Private Sub txtPOonPackSlip_BeforeUpdate(Cancel As Integer) Dim txtPOonPackSlip As Variant If (IsNull(DLookup ("[POI_Reference]", "POI", "[POI_PurchOrderID]='" & Me! txtPOonPackSlip & "' and [POI_Reference] = '" & Me! txtItemID & "'"))) Then MsgBox ("The ItemID entered is not on the PO entered. Check your Input.") Exit Sub Else Me!txtVendorName = DLookup ("[POM_PayName]", "POM", "[POM_PurchOrderID] ='" & Me! txtPOonPackSlip & "'") Me!txtBuyer = DLookup ("[POM_Buyer]", "POM", "[POM_PurchOrderID] = '" & Me! txtPOonPackSlip & "'") End If End Sub -----Original Message----- If I have a table with customers information and want to automatically fill in some of the info. on an order form, how do I tell access to auto fill that info? . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy Displayed info from a Form to Table | Randy Lucero | Using Forms | 0 | August 12th, 2004 02:22 PM |
Complicated Databse w/many relationships | Søren | Database Design | 7 | July 13th, 2004 05:41 AM |
Newbie? Do I use Report or Query | John Egan | New Users | 11 | June 28th, 2004 08:31 PM |
How do I bind a control on a form to a different table than the form is bound to? | Mark Gonyea | Using Forms | 2 | June 4th, 2004 09:01 PM |