473,407 Members | 2,314 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,407 software developers and data experts.

Query parameter with a combo box

Hi,

How do you reference a combo box first column in a query as a
parameter?
For example, in MyQuery in Name column, I want to put down as a
parameter from the first column of a combo box in the login form, like
this:

Name

[Forms]![frmLogin]![cboUsername].Column(1)

In the combo box: column (0) is the ID number, column (1) is the
name.

It doesn't work.

Thank you for your attention.

Pauline
Nov 12 '05 #1
1 1830
On 13 Apr 2004 15:50:49 -0700, Pauline Liu wrote:
Hi,

How do you reference a combo box first column in a query as a
parameter?
For example, in MyQuery in Name column, I want to put down as a
parameter from the first column of a combo box in the login form, like
this:

Name

[Forms]![frmLogin]![cboUsername].Column(1)

In the combo box: column (0) is the ID number, column (1) is the
name.

It doesn't work.

Thank you for your attention.

Pauline


Don't use the [Name] field to find records use the [NameID] field.

Add the [NameID] field to the query. Then use
[Forms]![frmLogin]![cboUsername]
as criteria in the [NameID] column.

The actual [Name] field will display the name while the [NameID] is
used to find the records.

I hope you do not have a field actually named "Name".
"Name" is a reserved key word in Access/VBA and should not be used as
a field name.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2

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

Similar topics

3
by: MX1 | last post by:
I'm ready to pull the hair out of my head. I have a query with a couple of parameters that I want to get from combo boxes on a form. One parameter is a date with a dynamically calculated year and...
1
by: Pauline Liu | last post by:
Hi, How do you reference a combo box first column in a query as a parameter? For example, in MyQuery in Name column, I want to put down as a parameter from the first column of a combo box in...
6
by: sheree | last post by:
I would like to create a query where one of the columns of the queries comes from a combo list box on a form. For example, if my table has the following fields: id name interest1 interest2...
5
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your...
4
by: Theo Jansen | last post by:
Hi, i'm making an application in Access and in the query made, i'd like the user to fill in a parameter when opening the query (in a report). It's much easier for the user if the parameter was a...
4
by: torontolancer | last post by:
Hi there how r u .I would really appriciate ur concern regarding checking out this code. its beind a command button and i am have a combo box selecing a query criteria and then pressing the button...
3
hyperpau
by: hyperpau | last post by:
Hi there guys! I have a Form where there are three comboboxes. This comboboxes are used as references for the parameter of 3 fields in a query. when I hit a command button in my form, it opens...
11
by: mezmerize | last post by:
Firstly a description of the situation to give you an insight. have a table of motorcycles (Registration no.,makes,models,colour,no.owners, etc. and i would like to be able to run a query that...
20
by: exipnakias | last post by:
Hello Guys. In a form I created a listbox which looks up the values of a table. I want: 1) ..to create a query where a parameter will be needed in order to be loaded. But I do not want to...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.