Hello all,
I'm extremely new to the programming world. I'm a salesmen by day and
programming wannabee by night. I'm working with a database engine
called ADBM for windows. Its based on a SQL database.
I have 2 tables and 2 views. 1st is "Prospect View" and 2nd is "Check
View". One of the primary fields in both tables is the (ACCT#) field.
What I am trying to do is this. When I'm in the "Check View" and I type
a prospect number in the (ACCT#) field, I need a macro to run only on
when the (ACCT#) field has been changed. This macro needs to go take
the newly typed in number of (ACCT#) field in from the "Check View" and
go look in the "Prospect View, or Table" and find the correct (ACCT#)
match, then bring back all related info about this prospect,
specifically the Business name, Last Name, First Name, etc. Important
to note here, due to what I am doing, I cannot have this done by a
formula using a link between the views. Reasons are to long to explain.
Main thing is I need to make this happen using a macro upon the field
change. The ADBM database has a field wizard where you can tell the
macro to run upon either a 1. entry to the field, 2. leaving the field,
3. changing the field and 4. double clicking on the field. So I know
where to put the macro in the changing the field. What I don't know is
the specific code to accomplish this macro.
I tried doing a GetField to take the entry of the ACCT# from the Check
View, then do a LoadView Record, to go open the Prospect Table in record
mode. Then do a Putfield in attempting to bring this info back. But I'm
definitely missing something? Both the GetField and PutField commands
can have an SQL statement in them. How do I write it so that it says,
take the account number typed in in this view, then go look over in the
Prospect Table, go find the account number that matches this account
number, bring up all the account info regarding this account number,
then bring back all the corresponding fields about this account number?
Again, I'm guessing the GetField and PutField are part of it. Do I need
to use the ZoomLink and ZoomReturn? How do I write the the part about
"this ACCT# in the Check View needs to equal that ACCT# over in the
Prospect table?
Any help is GREATLY appreciated. I'm seriously getting addicted to
this!!!
Thanks in advance for any help.
ADBM24