No connection between mainform and popup-form ?

S

SpookiePower

I have a main form that shows info about a customer, and I now have
made a popup form on which I want to make an invoice to the customer
displayed on the mainform. My problem is that the info about the
customer on the mainform, is not showed on the popupform. It is
allways customer number 1 in the database that is displayed on the
popupform no matter what custemor is on the mainform.

In the popupform's source control I have put this sql -
select * from custemortabel. And then by using the Field list,
I have put the fields on the popupform.

I guess that I miss some connection between the mainform and
the popupform.
 
G

guido via AccessMonster.com

There is no inherent connection between forms. When you open the popup, use a
where statement like;
DoCmd.OpenForm "FRM_INVOICE", , , "Customer_Nbr=" & Customer_Nbr.Value
 
G

Guest

ok this work if a record already exist that the pop up form references. If
not the popup opens empty. Which in my case is good. However, when I try
and close the form after entering the data it gives an error saying the
primary key can not be null. OK what I want is that the primary key for hte
new record in this table to be pulled from the form from which I opened the
popup form.

How do I get this to 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