Autofill fields

G

Guest

Hello all,

On a form i am trying to create, i have two fields which im trying to set it
so that when the first one is filled in, the second one automaticaly fills in
with the relevent data.

i have two tables feeding this form, and i cant seem to get the code right.

Me.changes = Me.FunctionalArea.column(1)

Changes is the name of the second field form (the one i want to fill in)
FunctionalArea is the name of the first field on the form, im pretty new to
access development and a little stuck.

thanks for any help
 
L

Lynn Trapp

I'm assuming that Me.FunctionalArea is a combobox? If so, can you post the
SQL that is the row souce for it?
 
G

Guest

Hi

What type is your first field? (Textbox, combobox etc)

Under most circumstances you just need...

Me.changes = Me.FunctionalArea

Using column(x) is for listboxes and comboboxes

Hope this helps

Andy Hull
 
G

Guest

To answerAndy's Question, the first box is a combo box, and to answer Lynns,
the sql of the combo box is

SELECT FunctionalArea.Areas, FunctionalArea.checks FROM FunctionalArea ORDER
BY [Areas];

i have got the widths set to 2' 0', so it hides the second field, which is
the field that i want the second field on my form to be showing
 
B

BruceM

Make an unbound text box. Set its control source to =[cboAreas].Column(1)
cboAreas is the name of the combo box. Use whatever name you choose.

Note that there is a distinction between fields and controls. Controls are
pretty much anything that appears on a form or report: text box, combo box,
label, line, etc. Some controls such as text boxes may be bound to fields,
or they may be unbound. In your case, you want a control (text box) to show
the second field from the combo box, but since Checks is already in
FunctionalArea there is no need to store it again in the table on which the
form in question is based.
 
G

Guest

Sorry i think i missed a part out, if possible i would like to make the text
box show the 2nd column of the combo box, then let it be edited and saved to
well where ever to be honest.

The 2nd column or "checks" is basicly a list for the users to fill in along
the lines of

"have you checked this....." yes
"have you done this" ..... no

but this list changes depending on the areas, thus im trying link the two
fields on this form.

sorry again, and thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top