pop up form not relating to main form

D

dosima

Hi

i want to try and create a pop up form that relates to the main form.
The problem that i am having is that when i click on the pop up form, it
goes to the first record which is not what i want. i want it to go to the
correct record.

i have a main form with customer details, and have the button for the pop up
form on there.
the pop up form displays bank detials of customers which is also in the same
table as the customer details, so i thought this would make it easier, but i
just cant seem to open the popup form to the correct customer.

if you could help me and tell me what i need to do.
thanks
 
J

Jim Bunton

For the pop up form modify the recordsource to be

Select . . . . . . . . . .
WHERE CustomerId = [Forms]![TheOtherForm].[CustomerId]


the CustomerId must be part of the Rowsource query for thOtherForm AND if
it's displayed then make sure the name of the control displaying it has the
same name.

You can keep the second form insynch by using an appropriate event on it to
requery the second form

Forms!SecondFormName.requery
 
D

dosima

Hi Jim

i've got it to sort of work.
Wheni click on the button on the main form it takes me to the correct record
on the pop up form.
But then the pop up form will not let me enter data into any of the fields.
Also the CustomerID field is displaying an error as #NAME?

I think there is a problem on the pop up form, but im not sure what to do.

Jim Bunton said:
For the pop up form modify the recordsource to be

Select . . . . . . . . . .
WHERE CustomerId = [Forms]![TheOtherForm].[CustomerId]


the CustomerId must be part of the Rowsource query for thOtherForm AND if
it's displayed then make sure the name of the control displaying it has the
same name.

You can keep the second form insynch by using an appropriate event on it to
requery the second form

Forms!SecondFormName.requery

dosima said:
Hi

i want to try and create a pop up form that relates to the main form.
The problem that i am having is that when i click on the pop up form, it
goes to the first record which is not what i want. i want it to go to the
correct record.

i have a main form with customer details, and have the button for the pop
up
form on there.
the pop up form displays bank detials of customers which is also in the
same
table as the customer details, so i thought this would make it easier, but
i
just cant seem to open the popup form to the correct customer.

if you could help me and tell me what i need to do.
thanks
 

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