473,383 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Dlookup... ARRRGGGHH!

Hi,
Am simply trying to populate a text box in the input form with a value
once a selection is made from a drop down box.

Table Name: BDMAMList

BDM UserID

Joe GRXCVF
Adam HNANDL

So if the drop down box selects Joe, then a text box is automatically
populated with GRXCVF.

Is Dlookup the correct function to be using for this?

Cheers,
Adam

Nov 15 '06 #1
4 1534
ab*******@aapt.net.au wrote:
Hi,
Am simply trying to populate a text box in the input form with a value
once a selection is made from a drop down box.

Table Name: BDMAMList

BDM UserID

Joe GRXCVF
Adam HNANDL

So if the drop down box selects Joe, then a text box is automatically
populated with GRXCVF.

Is Dlookup the correct function to be using for this?

Cheers,
Adam
I can be, but since you are already retrieving the BDM field for your ComboBox
RowSource it would be easier and more efficient to include the UserID field in
the ComboBox RowSource as a hidden column and then just set the ControlSource of
your other TextBox to...

=ComboBoxName.Column(1)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Nov 15 '06 #2
Thanks Rick, but how do I hide the column in the combo box?

Rick Brandt wrote:
ab*******@aapt.net.au wrote:
Hi,
Am simply trying to populate a text box in the input form with a value
once a selection is made from a drop down box.

Table Name: BDMAMList

BDM UserID

Joe GRXCVF
Adam HNANDL

So if the drop down box selects Joe, then a text box is automatically
populated with GRXCVF.

Is Dlookup the correct function to be using for this?

Cheers,
Adam

I can be, but since you are already retrieving the BDM field for your ComboBox
RowSource it would be easier and more efficient to include the UserID field in
the ComboBox RowSource as a hidden column and then just set the ControlSource of
your other TextBox to...

=ComboBoxName.Column(1)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Nov 15 '06 #3
ab*******@aapt.net.au wrote:
Thanks Rick, but how do I hide the column in the combo box?
Look at the ColumnWidths property of the ComboBox. This will be a semi-colon
delimited list of widths for each column. To hide a column just use a width of
zero.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Nov 15 '06 #4
ab*******@aapt.net.au wrote in
news:11**********************@m73g2000cwd.googlegr oups.com:
Hi,
Am simply trying to populate a text box in the input form with
a value once a selection is made from a drop down box.

Table Name: BDMAMList

BDM UserID

Joe GRXCVF
Adam HNANDL

So if the drop down box selects Joe, then a text box is
automatically populated with GRXCVF.

Is Dlookup the correct function to be using for this?

Cheers,
Adam
much simpler is to modify the combobox to hold the two values,
(if you make the width of the second column 0" it will not be
seen) and use a single line of code in the combobox_AfterUpdate
event to stuff the value of the second column into the textbox.

me.textbox.value = me.combobox.column(1)

replace textbox and combobox with the correct identifiers in
your form.
Note: the 1 is not an error, the first column is 0.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Nov 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: KLAU | last post by:
I have a field that retrieves information from an expression in a query. I have used a DLookup function to get the calculated field from the query. However, the relationship is 1-to-many so one...
6
by: JLM | last post by:
What am I missing here? I have a form where I enter a "Class Code". This value corresponds to what sits in table "class code descriptions" along with the "title" of each "class code." Key...
4
by: MLH | last post by:
I have tried using DLookUp in this manner... If DLookUp("","tblClients","='2021234567'") Then MsgBox "Found it!" End If I am wondering if that is a misuse of the DLookUp command? Type...
2
by: ctyrrell | last post by:
I have read with interest the many discussions of the 3048 Error: Cannot open any more databases. I understand how the number of open Table ID's causes the problem. My question has to do with the...
8
by: Christine Henderson | last post by:
I have a problem using the above function in the following simplified circumstance: In the lookup table called "Klms Travelled" I have 3 fields, eg: Receiver Name Receiver Suburb ...
11
by: MLH | last post by:
DLookup("", "tblPreliminaryVINs", "=Forms!frmVINODO!SerialNum") is giving me a Type Mismatch error. That's confusing to me and I don't know how to circumvent it. The field in...
2
by: Don | last post by:
Can someone help me fix my DLookup problem. I'm far from proficiency with Access. I've been creating databases for several years for work with the help of many of you and trial and error. I have...
9
by: | last post by:
In my database I have a 'control table' in which basic info is stored about the application, for instance the application's path and the name of the company that is using it. In all of the...
15
by: rleepac | last post by:
This is a little complicated but I'll do my best to explain. In my db I have a table called L_AgeCorrection which has the following fields: Age, Sex, Frequency, AgeValue This is a table used to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.