Problem with my invoice and report

foody

Registered User.
Local time
Today, 14:01
Joined
Sep 21, 2005
Messages
36
I have couple of problems I need to be resolved and I hope someone here can be able to help me. I have an estimate (all form designed), that when I click the button export to internal invoice, I want the contents of all the estimate moved to the internal invoice and display the invoice, without getting an error cannot delete invoice because they are in a relationship. Does anyone know how to do this? Second then I am having a problem is when I click the button Display report for an invoice I don't want it to display ALLL THE REPORTS of the all the invoices in the database, just the current report for that invoice. This way for example, when I am in invoice number 2130, I don't want too, when I click the button Display Report, to scroll all the way to report of invoice number 2130 to print the invoice. That would be a big problem. Can anyone please help me?
 
1. Define proper relationships between your tables. Enforce RI and specify Cascade Delete where appropriate. When you copy data from one table to another, you also have to take care of copying the child records. When everything is copied, you can delete the parent source record and that (if you have specified cascade delete) will also delete all related child records.
2. Add the where argument to the OpenReport method. The where argument is just like the where clause of a query without the word Where.
 
I have one more question I would like to ask you please.

Thank you so much for the informtion it really helped a lot. I have one more question I would like to ask you please. I have this information

Name
Address
Telephone

I want to be able in Microsoft Access, when I enter the name "Fahed Al Daye" which already exist in the table called customer record and that name has in the same table the address "address here" and telephone "telephone here", so as I was saying, when I enter the name "Fahed Al Daye" in the field Name, which is a new record, I want it to be able to search in the table called customer record and see if the name "Fahed Al Daye" exists in that table. If it exists, I want it to immediatly fill in the fields:

Name Fahed Al Daye
Address Address here
Telephone Telephone here

But if it doesn't find that information in the table "customer record" it would just simply enter the information in the record field as if nothing happened. Do you know what I mean? Can you be able to help me do that through Visual Basic code or Macro please? Thanks in advance.
 
No that would be silly because I have to enter every combo box to fill in the information where as what I wanted is to fill the entire field if it found the person's name already in the database automatically.
 
What do you mean "entire field", are you saying all this information is stored in one field? :confused:
 
Rich said:
What do you mean "entire field", are you saying all this information is stored in one field? :confused:

No, in the table there are many columns
Name
Address
City
Province
Telephone number
and so on
now I have created a form that links to the table, I want to be able to enter the name of the person in the form (bare in mind linked to the table) and with either macro or VB in the out of focus event, it checks to see if that name already exist in that table and if it does, it enters all the fields, Name, address, city, etc from that table into the form field. I hope that helped.
 
Like I said, use a combo box to enter the name, the Wizard will create a lot of the code for you if you use the "Find a record on my form" option.
 
Where would you find that option in the form design view?
 

Users who are viewing this thread

Back
Top Bottom