Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to question

How to question

How to question

How would I write a script to do the following?
2 tables     Table1    Table2
I want to enter information into Table1 and then take specific fields:    Field1    Field2   Field3   and automatically enter the values of those fields into the corresponding fields in Table2.

Thank you in advance for any assistance

RE: How to question

Several ways to go, it depend how your structure is.

A possible way to go:

Enter the data in table 1.
Put a button to trigger the script to push the new data in table 2, using the SetField() function.

Or, trigger the script to anter data in table one, put the script 'on hold' during data input in Table 1.
Resume script to push data in Table 2 with SetField().

RE: How to question

Thanks for your info.  I know that i use SetField,  my problem is getting the exact form of the script for SetField to work.     How would i write the script-  

RE: How to question

Several ways.

1. Push data in table 2 with a button in table 1.

Put button in Table 1 with script attached.

2. Push data in table 2 with script in table 1.
Depend how you have to enter data in Table 1. Suppose it is in the 3 fields, starting at Field 1. Make field 1 a button with script attached:
Goto layout (yourLayout)
Goto Field (Table1::Field1)
Pause/Resume Script (Indefinitely)
call the script above if you want to work modular.

During the pause time you can do what ever is needed, hit Enter to resume the script.

3. You can set 3 variables in a script and push the values into the fields in Table 2

4. You can do it without script. With a relationship and 3 lookup fields, triggered by the new values in the fields in Table 1.

RE: How to question

5. With the plug-in on the FM CD to trigger a script when leaving the last field in Table 1.

6. With zipScript.

Don't know your structure, but if you have to stay in Table 1, I prefer the lookup way. You don't have to trigger a script (push button) and the data will have the latest version. Chances are the user 'forget' to push the button.
Unless you build in a way to prevent the user to leave the layout as long as he/she didn┬┐t click.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close