Newbies rapp Posted June 3, 2000 Newbies Share Posted June 3, 2000 Hi! I got a Adress database and want to make a button that opens up my Invoice database and make a new record and put in name, adress... from the Adress database... Link to comment Share on other sites More sharing options...
Keith M. Davie Posted June 3, 2000 Share Posted June 3, 2000 Buttons operate scripts. Therefore you need to write a script which will create a new record in Invoice.To get the address into the Invoice record, you can either include that as part of the script, or as a lookup in relation to some field which is part of the script. Link to comment Share on other sites More sharing options...
Louisa Posted June 5, 2000 Share Posted June 5, 2000 Hi, Create a relationship between the two databases on an ID field. When you switch from the Address database to the Invoice database and create a new record on a form which contains the related fields from the Address database. This way the related information is automatically displayed and you don't have to copy any information. This can all be scripted to a button. Louisa Link to comment Share on other sites More sharing options...
Newbies jim crain Posted June 7, 2000 Newbies Share Posted June 7, 2000 I hope this can help: There are a couple of things to consider. Do you want the address information to always remain the same on the invoice? In other words, if your customer moves, do you want the previously created invoices to reflect the new information or the original information (usually, you want to know exactly what you did at the time you did it for auditing purposes). To keep the data the same, perform a lookup on each field using some kind of customer number that is unique. A system-generated serial number works great for customers. For customer and invoicing systems, I always write a script to set a global field (e.g. Global Customer Number) in the customer file to the customer serial number. I run an external script in the invoice file to start a new invoice and set the new invoice customer number equal to the global field data in the customer (Address, in your case) file. A relation is set up in the Invoice file to the unique Customer Serial Number. Setting global fields lets you use the data more easily if you need to process other things from that number. Also, if you copy and paste, the system has a higher risk of a problem. Example script: Comment: from the current record. Set Customer Number Global to Customer Number Perform External Script: Invoice File: New Invoice External Script: invoice File: Set Invoice File: Customer Number to Customer File: Global Customer Number. This should perform all necessary lookups if your address fields in the Invoice file are set to lookup based on the customer id. With the global field idea you can also make a new invoice, same customer script in the Invoice file, if that ever comes up. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 8917 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now