gowrann Posted May 22, 2002 Posted May 22, 2002 contacts.db and orders.db have a relationship with the field contact as the key. HOw can i create a script/button in contacts.db that will take the current record details from conatcts.db , create a new record in orders.db and leave me with that db in the foreground with the related info?
Pupiweb Posted May 22, 2002 Posted May 22, 2002 Always use a unique ContactID field (usually a serial number) in relationships ... For your question: You should already have a relationship linking ContactID in Orders to ContactID in Contacts, so that all the contact's details are filled in automatically, using a lookup Create an All-to-All relationship (joining two calc fields = 1 on both sides) between Contacts and Orders Create a gID global text field in Orders Scripts: Set field (All::gID, ContactID) Perform script in Orders (see below): New Record Set field (ContactID, gID) Go to Layout (a layout with the info you want)
oilman Posted May 22, 2002 Posted May 22, 2002 make sure that you have check the create a new record in the relationship dialog box
gowrann Posted May 23, 2002 Author Posted May 23, 2002 can you tell me more in laymen terms on this bit: using a lookup Create an All-to-All relationship how is this done? (joining two calc fields = 1 on both sides) between Contacts and Orders Create a gID global text field in Orders Scripts: Set field (All::gID, ContactID) Perform script in Orders (see below): New Record Set field (ContactID, gID) need a guided step on this!! Go to Layout (a layout with the info you want) " Maybe I'll run through my issue again: I have 2 dbs; contacts.db and orders.db they have a relationship defined on the main contact field. The contact field in the orders.db is a value list defined from the contact field in contacts.db with other related data looked up. What I want to achieve is when a user has found the contact they want in contacts.db, have a button there that when clicked opens the orders.db, creates a new record with the contact field and other related data autofilled. How would I achieve this? Cheers
Recommended Posts
This topic is 8565 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