PC Review


Reply
Thread Tools Rate Thread

Autofill a subform

 
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      7th Jun 2005
Hello.

I am trying to help a friend with his access database and I have run into a
snag. I am creating a data entry form for Ordering that needs to interact
with 2 tables. The main one is Order_History which contains information like
Name, Address, Order Number, etc. and then Order_Details which will contains
all the specifics of the order such as Size, Color, Quantity, etc. I created
one form that contains a subform so that all the information that needs to be
inputed would be in one spot. I also created a combo box for repeat orders so
that all you need to do is select the order you want to repeat, and it will
automatically fill the new form. This worked fine for the information that
goes to the main form, but I do not know the correct syntax for it to auto
fill a subform.

To autofill for a form, you write something like this as an Event Procedure:

Me.firstName = Me!ComboBox.Column(1)
Me.lastName = Me!ComboBox.Column(2)
Me.address = Me!ComboBox.Coulmn(3)
.... etc

What do you write when you want to automatically fill in a subform with the
information from a Combo Box?

Is it something like this:
Me.[Subform].Size = Me!ComboBox.Coulmn(4)

Also, when you choose data from the combo box, it will automatically fill in
what you tell it to, but when you select something else in the combo box the
data on the screen does not change. Is there something else I have to do
inorder to refresh the screen?

I greatly appreciate any assitance you could provide.

Thanks,

-Michael


 
Reply With Quote
 
 
 
 
Tim Ferguson
Guest
Posts: n/a
 
      8th Jun 2005
"=?Utf-8?B?TWljaGFlbA==?=" <(E-Mail Removed)> wrote in
news:A01C7E1F-39A3-4E73-A6C5-(E-Mail Removed):

> To autofill for a form, you write something like this as an Event
> Procedure:
>
> Me.firstName = Me!ComboBox.Column(1)
> Me.lastName = Me!ComboBox.Column(2)
> Me.address = Me!ComboBox.Coulmn(3)
> ... etc
>
> What do you write when you want to automatically fill in a subform
> with the information from a Combo Box?
>
> Is it something like this:
> Me.[Subform].Size = Me!ComboBox.Coulmn(4)
>
>


Pretty close:

Me!MySubformControl.Form!txtSize = Me!ComboBox.Column(4)

Me!MySubformControl refers to the actual control on the (main) form - its
..Form property then exposes all the usual controls and properties of the
form contained inside it, If You See What I Mean.

Hope that helps


Tim F

 
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
Subform to be completely autofill =?Utf-8?B?RnJlaWRh?= Microsoft Access Forms 0 24th Sep 2007 03:30 PM
Autofill subform entries =?Utf-8?B?RnJhbmNpbmUgT3R0ZXJzb24=?= Microsoft Access 1 19th Sep 2007 05:10 PM
Autofill subform to mainform =?Utf-8?B?UGhpbA==?= Microsoft Access 2 27th Nov 2006 07:31 AM
autofill in subform Lincoln Beachy Microsoft Access Form Coding 0 1st Aug 2006 03:00 AM
Autofill subform lsantos Microsoft Access 1 13th Feb 2004 12:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:13 AM.