By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,857 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

Listbox Selection

100+
P: 173
Hi,

how can i populate some empty fields/comboboxes by clicking a record in the listbox?

the fields come below the listbox, possibly a subform............

the details are stored in my table..................??
Dec 20 '06 #1
Share this Question
Share on Google+
10 Replies


100+
P: 173
?? any1 :) help would be appreciated... im a bit stuck !!!
Dec 21 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Hi,

how can i populate some empty fields/comboboxes by clicking a record in the listbox?

the fields come below the listbox, possibly a subform............

the details are stored in my table..................??
Beany you will need to give a lot more information. What is the record source of the form? What is the Row Source of the Listbox? What records to you want to show in the subform?

Mary
Dec 21 '06 #3

100+
P: 173
Beany you will need to give a lot more information. What is the record source of the form? What is the Row Source of the Listbox? What records to you want to show in the subform?

Mary

Hi sorry about that,

the record source of my form is Query1............

the row source of my listbox is Query1...................

The listbox contains fields such as provider, product,address,postcode,ip,tel etc etc. The only ones i hav made viewable is PROVIDER, TEL, POSTCODE AND SITE.

So if i click on the listbox list, i just want it to show all the details just below it.......


my table is called tab_data..................

does that make sense?
Dec 21 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
Sorry Beany I still need more information

Can you post the full SQL for Query1

The listbox contains fields such as provider, product,address,postcode,ip,tel etc etc. The only ones i hav made viewable is PROVIDER, TEL, POSTCODE AND SITE.
I don't understand what you mean here

Mary
Dec 21 '06 #5

100+
P: 173
Sorry Beany I still need more information

Can you post the full SQL for Query1



I don't understand what you mean here

Mary
Ok the SQL for Query1 is:

Expand|Select|Wrap|Line Numbers
  1. SELECT tab_data.provider, tab_data.product, tab_data.site, tab_data.tel, tab_data.address_1, tab_data.address_2, tab_data.address_3, tab_data.postcode, tab_data.ip, tab_data.username, tab_data.password, tab_data.use, tab_data.type, tab_data.status, tab_data.notes, tab_data.line_provider, tab_data.line_status
  2. FROM tab_data
  3. WHERE (((tab_data.provider) Like "*" & [Forms]![Search]![Search2] & "*")) OR (((tab_data.site) Like "*" & [Forms]![Search]![Search2] & "*"))
  4. ORDER BY tab_data.provider;
Dec 21 '06 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
Ok the SQL for Query1 is:

Expand|Select|Wrap|Line Numbers
  1. SELECT tab_data.provider, tab_data.product, tab_data.site, tab_data.tel, tab_data.address_1, tab_data.address_2, tab_data.address_3, tab_data.postcode, tab_data.ip, tab_data.username, tab_data.password, tab_data.use, tab_data.type, tab_data.status, tab_data.notes, tab_data.line_provider, tab_data.line_status
  2. FROM tab_data
  3. WHERE (((tab_data.provider) Like "*" & [Forms]![Search]![Search2] & "*")) OR (((tab_data.site) Like "*" & [Forms]![Search]![Search2] & "*"))
  4. ORDER BY tab_data.provider;
If this query returns multiple records to a listbox what will you use to uniquely identify a record from the listbox.

Mary
Dec 21 '06 #7

100+
P: 173
If this query returns multiple records to a listbox what will you use to uniquely identify a record from the listbox.

Mary

I dont know??? im confused.............

isnt there a way where i just a click the record and it shows all the details in a form below also?

sorry im an access amateur
Dec 21 '06 #8

MMcCarthy
Expert Mod 10K+
P: 14,534
I dont know??? im confused.............

isnt there a way where i just a click the record and it shows all the details in a form below also?

sorry im an access amateur
It has to know which record to show. You need some way to uniquely identify the record like a primary key field.

Mary
Dec 21 '06 #9

100+
P: 173
It has to know which record to show. You need some way to uniquely identify the record like a primary key field.

Mary

ive got a userID field also in my table.....................

i didnt include it my Query1.............

shall i make that my primary key? i didnt need it to show in my Listbox?
Dec 21 '06 #10

MMcCarthy
Expert Mod 10K+
P: 14,534
ive got a userID field also in my table.....................

i didnt include it my Query1.............

shall i make that my primary key? i didnt need it to show in my Listbox?
You don't need to show it but you do need it to identify the record you want to return.

Mary
Dec 21 '06 #11

Post your reply

Sign in to post your reply or Sign up for a free account.