listbox depending row

J

Jean-Paul

Hi,

In my listbox I have 3 rows.
The most important one is row 1
So, I use the values of row 1 when I click the listbox.
Is it possible to use the values of row 3 too?
Thanks
JP
 
J

Jeff Boyce

We aren't there. We can't see what you're working on.

What do you mean by "use the values of .."?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jean-Paul

Sorry...

Second try

I have a listbox with 3 rows
email_adress place name

the depending row is email_adress
So, when I click the correct row, I get the email_adress to "work" with.
But (and I hope you understand it now.... I can explain it better in
Dutch...)
I also want the value of row3 = name to work with...

How can this be done?

Thanks for your kind help! (all of you people, by the way)
JP, belgium
 
J

Jeff Boyce

Jean-Paul

There may be a potential confusion ...

You mentioned "3 rows", then listed three fieldnames ("email_address",
"place", "name"). Are those fieldnames or row-names? If they are
"row-names", you have a spreadsheet, not a relational database table.

By the way, the word "name" is a reserved word in Access. What Access
believes you mean and what you meant may not match ... you may want to
change that.

And if you are using "name" to represent a full name (FirstName & " " &
LastName), how will you sort by LastName?

You posted in a .formscoding newsgroup, so I'll assume you are trying to do
this in a form.

One way would be to create a combobox control in that form based on the
table containing three fields/columns: [email_address], [place],
[personname].

You can add an unbound text control and add code to the combobox's
AfterUpdate event, something like:

Me!YourTextbox = Me!YourCombobox.Column(2)

Given the fields in the order you provided, the above code would find the
[personname] for the [email_address] selected and put it in the textbox.

MS Access HELP can provide more details on the correct syntax.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jean-Paul

Sorry for the confusion...
I meant colums and not rows...
JP

Jeff said:
Jean-Paul

There may be a potential confusion ...

You mentioned "3 rows", then listed three fieldnames ("email_address",
"place", "name"). Are those fieldnames or row-names? If they are
"row-names", you have a spreadsheet, not a relational database table.

By the way, the word "name" is a reserved word in Access. What Access
believes you mean and what you meant may not match ... you may want to
change that.

And if you are using "name" to represent a full name (FirstName & " " &
LastName), how will you sort by LastName?

You posted in a .formscoding newsgroup, so I'll assume you are trying to do
this in a form.

One way would be to create a combobox control in that form based on the
table containing three fields/columns: [email_address], [place],
[personname].

You can add an unbound text control and add code to the combobox's
AfterUpdate event, something like:

Me!YourTextbox = Me!YourCombobox.Column(2)

Given the fields in the order you provided, the above code would find the
[personname] for the [email_address] selected and put it in the textbox.

MS Access HELP can provide more details on the correct syntax.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jean-Paul said:
Sorry...

Second try

I have a listbox with 3 rows
email_adress place name

the depending row is email_adress
So, when I click the correct row, I get the email_adress to "work" with.
But (and I hope you understand it now.... I can explain it better in
Dutch...)
I also want the value of row3 = name to work with...

How can this be done?

Thanks for your kind help! (all of you people, by the way)
JP, belgium
 
J

Jeff Boyce

Did you try the combobox approach I suggested?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jean-Paul said:
Sorry for the confusion...
I meant colums and not rows...
JP

Jeff said:
Jean-Paul

There may be a potential confusion ...

You mentioned "3 rows", then listed three fieldnames ("email_address",
"place", "name"). Are those fieldnames or row-names? If they are
"row-names", you have a spreadsheet, not a relational database table.

By the way, the word "name" is a reserved word in Access. What Access
believes you mean and what you meant may not match ... you may want to
change that.

And if you are using "name" to represent a full name (FirstName & " " &
LastName), how will you sort by LastName?

You posted in a .formscoding newsgroup, so I'll assume you are trying to
do this in a form.

One way would be to create a combobox control in that form based on the
table containing three fields/columns: [email_address], [place],
[personname].

You can add an unbound text control and add code to the combobox's
AfterUpdate event, something like:

Me!YourTextbox = Me!YourCombobox.Column(2)

Given the fields in the order you provided, the above code would find the
[personname] for the [email_address] selected and put it in the textbox.

MS Access HELP can provide more details on the correct syntax.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jean-Paul said:
Sorry...

Second try

I have a listbox with 3 rows
email_adress place name

the depending row is email_adress
So, when I click the correct row, I get the email_adress to "work" with.
But (and I hope you understand it now.... I can explain it better in
Dutch...)
I also want the value of row3 = name to work with...

How can this be done?

Thanks for your kind help! (all of you people, by the way)
JP, belgium

Jeff Boyce wrote:
We aren't there. We can't see what you're working on.

What do you mean by "use the values of .."?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hi,

In my listbox I have 3 rows.
The most important one is row 1
So, I use the values of row 1 when I click the listbox.
Is it possible to use the values of row 3 too?
Thanks
JP
 
J

Jean-Paul

Jeff... many thanks... everything works just as I want it to...
So dumb of me I overlooked the Column(x) thing,
Also, I explained the problem so badly

Again... 1000 thanks

JP

Jeff said:
Did you try the combobox approach I suggested?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jean-Paul said:
Sorry for the confusion...
I meant colums and not rows...
JP

Jeff said:
Jean-Paul

There may be a potential confusion ...

You mentioned "3 rows", then listed three fieldnames ("email_address",
"place", "name"). Are those fieldnames or row-names? If they are
"row-names", you have a spreadsheet, not a relational database table.

By the way, the word "name" is a reserved word in Access. What Access
believes you mean and what you meant may not match ... you may want to
change that.

And if you are using "name" to represent a full name (FirstName & " " &
LastName), how will you sort by LastName?

You posted in a .formscoding newsgroup, so I'll assume you are trying to
do this in a form.

One way would be to create a combobox control in that form based on the
table containing three fields/columns: [email_address], [place],
[personname].

You can add an unbound text control and add code to the combobox's
AfterUpdate event, something like:

Me!YourTextbox = Me!YourCombobox.Column(2)

Given the fields in the order you provided, the above code would find the
[personname] for the [email_address] selected and put it in the textbox.

MS Access HELP can provide more details on the correct syntax.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sorry...

Second try

I have a listbox with 3 rows
email_adress place name

the depending row is email_adress
So, when I click the correct row, I get the email_adress to "work" with.
But (and I hope you understand it now.... I can explain it better in
Dutch...)
I also want the value of row3 = name to work with...

How can this be done?

Thanks for your kind help! (all of you people, by the way)
JP, belgium

Jeff Boyce wrote:
We aren't there. We can't see what you're working on.

What do you mean by "use the values of .."?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hi,

In my listbox I have 3 rows.
The most important one is row 1
So, I use the values of row 1 when I click the listbox.
Is it possible to use the values of row 3 too?
Thanks
JP
 
J

Jeff Boyce

You are welcome.

Perhaps you can return the favor by helping out someone with a question
you've already learned an answer to...

Regards

Jeff

Jean-Paul said:
Jeff... many thanks... everything works just as I want it to...
So dumb of me I overlooked the Column(x) thing,
Also, I explained the problem so badly

Again... 1000 thanks

JP

Jeff said:
Did you try the combobox approach I suggested?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Jean-Paul said:
Sorry for the confusion...
I meant colums and not rows...
JP

Jeff Boyce wrote:
Jean-Paul

There may be a potential confusion ...

You mentioned "3 rows", then listed three fieldnames ("email_address",
"place", "name"). Are those fieldnames or row-names? If they are
"row-names", you have a spreadsheet, not a relational database table.

By the way, the word "name" is a reserved word in Access. What Access
believes you mean and what you meant may not match ... you may want to
change that.

And if you are using "name" to represent a full name (FirstName & " " &
LastName), how will you sort by LastName?

You posted in a .formscoding newsgroup, so I'll assume you are trying
to do this in a form.

One way would be to create a combobox control in that form based on the
table containing three fields/columns: [email_address], [place],
[personname].

You can add an unbound text control and add code to the combobox's
AfterUpdate event, something like:

Me!YourTextbox = Me!YourCombobox.Column(2)

Given the fields in the order you provided, the above code would find
the [personname] for the [email_address] selected and put it in the
textbox.

MS Access HELP can provide more details on the correct syntax.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sorry...

Second try

I have a listbox with 3 rows
email_adress place name

the depending row is email_adress
So, when I click the correct row, I get the email_adress to "work"
with.
But (and I hope you understand it now.... I can explain it better in
Dutch...)
I also want the value of row3 = name to work with...

How can this be done?

Thanks for your kind help! (all of you people, by the way)
JP, belgium

Jeff Boyce wrote:
We aren't there. We can't see what you're working on.

What do you mean by "use the values of .."?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hi,

In my listbox I have 3 rows.
The most important one is row 1
So, I use the values of row 1 when I click the listbox.
Is it possible to use the values of row 3 too?
Thanks
JP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top