ASAP Please - ComboLink

I

Irene

I've created a combobox1 and combobox2 in my form. First
click on the combobox1 value and then when you click on
combobox2, it will only display the values related to the
combobox1 values.

1) My "Me.combo2.requery" does not work in the combobox1
afterupdate. What is wrong?
2) How do I link from the value in combobox2 to form2?
Form2 was created using the form wizard and displays all
info in table1. Now, I want a "general" code that will
link me to any of the records in the form. Like if I
click on value A in combobox2, I want it to take me to the
form and record A. I do not want to list specific record
numbers, like when I use the GoToRecord. Please help! I
have an important meeting today and really really need to
knwo how to do this.

Have a great day! =)
..
 
D

Dirk Goldgar

Irene said:
I've created a combobox1 and combobox2 in my form. First
click on the combobox1 value and then when you click on
combobox2, it will only display the values related to the
combobox1 values.

1) My "Me.combo2.requery" does not work in the combobox1
afterupdate. What is wrong?

In what way doesn't it work? Error, or nothing happens? Make sure you
have the name of the combo box right -- after all, you gave it two
different ways in the paragraph above. Make sure the second combo box's
rowsource query correctly refers to the first combo box as a criterion.
2) How do I link from the value in combobox2 to form2?
Form2 was created using the form wizard and displays all
info in table1. Now, I want a "general" code that will
link me to any of the records in the form. Like if I
click on value A in combobox2, I want it to take me to the
form and record A. I do not want to list specific record
numbers, like when I use the GoToRecord.

Probably you'd have code in ComboBox2's AfterUpdate event along these
lines:

DoCmd.OpenForm "Form2", _
WhereCondition:="ID=" & Me.ComboBox2

The above would assume that "ID" is the name of the primary key of
Form2's recordsource, that it's a numeric field (an adjustment would
have to be made for a text field), and that ComboBox2's bound column
contains the ID field you want.
Please help! I
have an important meeting today and really really need to
knwo how to do this.

Maybe this is too late, but that's the way newsgroups work.
 

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