Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save MSHFlexGrid to Database or file?? 1

Status
Not open for further replies.

rtshort

IS-IT--Management
Feb 28, 2001
878
US
How would you go about saving the information in a MSHFlexGrid(used as an invoice) to a database so it can be recalled later?
Every day above ground is a GOOD DAY!!!
 
Come on guys and gals, someone has to know this?? Every day above ground is a GOOD DAY!!!
 
In my opinion, and in order to avoid redondant data (data mentioned several times in a same table) you should use two different Access tables called f.i. INVOICE_HEADERS (containing all information about the customer's id., date of the invoice and all other unique fields on the invoice) and INVOICE_ITEMS (containing all the fields such as item #, quantity, unit price and all other fields occuring more than once on the invoice).

Then make a one-to-multiple relation between them with a common field (f.i. Invoice_Nr in both tables).

When clicking the button control on the screen to save the grid data, first add programmatically a new record to the table INVOICE_HEADERS, then fill in the fields of that record.
Afterwards, make a new record in the table INVOICE_ITEMS, fill in the fields. Loop through the entire grid down to the bottom, and repeat for each record (add new record and fill in the fields).

When viewing an existing invoice, make a query in Access, make a report based onto this query, and call the OpenReport statement in your code passing a parameter (Invoice_Nr).

Good luck
Vincent
acady@yucom.be

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top