Make sure your columns in your combo are set up
correctly. You need to specify the Column Count, and make sure you
have the column widths set - you can't reference them in code unless they have a
width - even if it's zero.
Columns in combos are zero-based - meaning the first column
is (0), the second is (1)....etc.
If your combo's source is "SELECT OpNum, OpDescription FROM
tblSomeTable" then the column count should be 2 and the column widths should
read:
1";0";
...assuming you want to hide the description in the text
box.
Make the ControlSource of your textbox:
=[cboDescription].[Column](1)
Tom Oakes
Personal PC Consultants, Inc.
[EMAIL PROTECTED]
503.230.0911 (O)
402.968.6946 (C)
734.264.0911 (F)
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of brazilianbound
Sent: Tuesday, December 13, 2005 12:44 PM
To: [email protected]
Subject: [AccessDevelopers] Re: Using DLOOKUP
I tried it as you stated but it didn't work
As usual, I think that maybe i wasn't clear enough when describing
my problem. I have an unbound text box called txtdescirption. It's
populated off of my combo box OpNum. What I want it to do is when I
enter my value in the OpNum combo box, that the txtdescription would
update with the correct description.
Thanks Tobi!
--- In [email protected], "Hoffman, Tobi K \(DYS\)"
<[EMAIL PROTECTED]> wrote:
>
> You might be better off adding a column to the combobox (if you
set that
> column width to 0, it won't be seen in the pulldown). Then your
textbox
> source is like this:
>
> =cboDescription.Column(2)
>
> This is faster, and if you are using a subform, you won't have all
the
> values changing as you would with an unbound field. I'm assuming
here
> that column 0 is the key field, column 1 is the one that shows, and
> column 2 is your description field.
>
> Tobi
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of
brazilianbound
> Sent: Tuesday, December 13, 2005 2:15 PM
> To: [email protected]
> Subject: [AccessDevelopers] Using DLOOKUP
>
>
> I'm using DLOOKUP on a combo box to populate a txtdescription
field.
> But I can't get it to update automatically without physically
hitting
> the "F9". Is there a way to automatically update this field after
> changing the value in the combo box?
>
> Thanks!
>
> CODE
>
> =DLookUp("CostCenter","ScanCC_Qry","Forms!SCANFORM!
> OpNum=ScanCC_Qry.CostCenterNo")
>
>
>
>
>
>
>
>
> Please zip all files prior to uploading to Files section.
> Yahoo! Groups Links
>
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
| Microsoft access developer | Microsoft access help | Microsoft access database |
| Microsoft access training | Microsoft access training course | Microsoft access programming |
YAHOO! GROUPS LINKS
- Visit your group "AccessDevelopers" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
