Query Results

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table which I have queried and now have two columns of information.
I have column 1 information entering into a Combo Box for user selection. I
need to have column 2 information placed into a textbox once the user selects
a corresponding column 1 item. How do I do this?
 
In the After Update event of your combo box control:
Me.txtBoxToLoad = Me.cboMyCombo.Column(1)

Column number for combo boxes start with 0, so first column is 0 and second
is 1.
 
I tried this via combo box properties = After Update event, however, I keep
getting an error message that the macro "ME" doesn't exist. What am I doing
wrong?
 
Me refers to the current form. It is like shorthand for forms!MyForm
I don't understand why you are getting this. Post your code so I can look
at it.
 
I don't have any code written. What I have is a combo box with a Row Source
Type = Table/Query and Row Source: SELECT qryAEF_AllMonths.AFS FROM
qryAEF_AllMonths. This places the proper list values in the combo box for
the AFS - however I want to place the second column of information in the
query into a textbox.
 
I am sorry to be a pain, but your original answer still results in an error
message looking for a macro. I am at my wits end and still need to have the
query results from the second column display in a text box text field. Any
other ideas?
 
At what point do you get this error. The use of Me is the most common way to
refer to object on the current form or report. The code I posted should not
cause such an error.
 
See below I have no code written:

As soon as I Open the form and select the AFS from the combo box, I get the
error message that "Microsoft Access can't find the macro 'Me." The macro
(or its macro group) doesn't exist, or the macro is new but hasn't been
saved. Note that when you enter the macrogroupname.macroname syntax in an
argument, you must specify the macro's macro group was last saved under. OK'
"
 
Back
Top