PC Review


Reply
Thread Tools Rate Thread

Auto filling certain fields in a form

 
 
=?Utf-8?B?SmFzb25T?=
Guest
Posts: n/a
 
      1st Jul 2005
In Access 2000, I would like my user to be able to enter data into a form
field, which would in turn automatically fill in two other fields based on
information retrieved from Table A, which is a master table of part numbers.
The user would then fill in more fields in the form. All data would then be
stored in Table B, including the automatic entries. I currently have a
one-to-many relationship established between the Tables A and B, with
referential integrity and cascade updates enforced. I most likely have left
out an important detail, but can anyone help me here?

Jason
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      1st Jul 2005
I would use a combo box based on TableA which includes fields from the
master table you want to update in TableB. You would use the after update
event of the combo box to set the other text box values.

Me.txtListPrice = Me.cboPartNum.Column(1)
Me.txtWarranty = Me.cboPartNum.Column(2)

--
Duane Hookom
MS Access MVP


"JasonS" <(E-Mail Removed)> wrote in message
news:8EB8BCEB-D8E0-496B-8AF4-(E-Mail Removed)...
> In Access 2000, I would like my user to be able to enter data into a form
> field, which would in turn automatically fill in two other fields based on
> information retrieved from Table A, which is a master table of part
> numbers.
> The user would then fill in more fields in the form. All data would then
> be
> stored in Table B, including the automatic entries. I currently have a
> one-to-many relationship established between the Tables A and B, with
> referential integrity and cascade updates enforced. I most likely have
> left
> out an important detail, but can anyone help me here?
>
> Jason



 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      1st Jul 2005
On the AfterUpdate event of the field, use

Me![field2Name] = DLookup(fieldName, domain/table, whereStatement)

JasonS wrote:
> In Access 2000, I would like my user to be able to enter data into a form
> field, which would in turn automatically fill in two other fields based on
> information retrieved from Table A, which is a master table of part numbers.
> The user would then fill in more fields in the form. All data would then be
> stored in Table B, including the automatic entries. I currently have a
> one-to-many relationship established between the Tables A and B, with
> referential integrity and cascade updates enforced. I most likely have left
> out an important detail, but can anyone help me here?
>
> Jason

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Filling fields in form Bev Microsoft Access Form Coding 7 24th Mar 2010 09:32 PM
Auto filling fields in a sub-form (Access 2003) BigAl Microsoft Access Forms 1 7th Oct 2009 07:20 PM
Auto filling data fields in a sub form Chris Microsoft Access Form Coding 0 4th Aug 2006 02:39 PM
Auto filling form fields Jacques Latoison Microsoft Access Forms 3 13th Jun 2005 11:36 PM
Auto filling fields in a form Mark Microsoft Access 0 31st Mar 2004 05:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 PM.