Randomblink
The Irreverent Reverend
- Local time
- Today, 14:57
- Joined
- Jul 23, 2001
- Messages
- 279
Not sure where to start...
I have records that need to be handled / coded specially...
In other words...
Let's call this my OrderDatabase.
Let's say I have a form, we will call it: OrderForm
When I am filling in the order for a customer, if I pull up customer ABC, I want code to run in the background that alters the Tax AND Highlights the textbox with their Company / Ordering Name in it. Or let's say I select Item XYZ, I need to have a MSGBOX pop up to alert me that this item has special paperwork to process with it AND I want it to Register the customer who is ordering it with a special Discount ID# in their notes field...
Now these exact examples are false.
I know that I could run select case statements out the whazoo to do the same thing. I could even manipulate some text fields to do something similar. But I want to have a string of code, function, or whatever that is associated with EACH record...maybe even two fields...although if I could create functions in the field that would be just as good....
Now then...
IF (and I mean IF) I cannot put a block of code in a field and run it whenever that code is pulled up with the record it is attached to...then MAYBE, I could call a function when that record is selected by putting the function name in a field and calling it whenever the record is pulled up.
For instance...
I create my Item Table and it has an extra field in it, called CODE...
As I put in each item, I add something like: Call ThisFunction(ThisArg, ThatArg)
Then, whenever that item is pulled up, it calls ThisFunction utilizing ThisArg and ThatArg as arguments...
Can someone help me...?
Thanks in advance...
I have records that need to be handled / coded specially...
In other words...
Let's call this my OrderDatabase.
Let's say I have a form, we will call it: OrderForm
When I am filling in the order for a customer, if I pull up customer ABC, I want code to run in the background that alters the Tax AND Highlights the textbox with their Company / Ordering Name in it. Or let's say I select Item XYZ, I need to have a MSGBOX pop up to alert me that this item has special paperwork to process with it AND I want it to Register the customer who is ordering it with a special Discount ID# in their notes field...
Now these exact examples are false.
I know that I could run select case statements out the whazoo to do the same thing. I could even manipulate some text fields to do something similar. But I want to have a string of code, function, or whatever that is associated with EACH record...maybe even two fields...although if I could create functions in the field that would be just as good....
Now then...
IF (and I mean IF) I cannot put a block of code in a field and run it whenever that code is pulled up with the record it is attached to...then MAYBE, I could call a function when that record is selected by putting the function name in a field and calling it whenever the record is pulled up.
For instance...
I create my Item Table and it has an extra field in it, called CODE...
As I put in each item, I add something like: Call ThisFunction(ThisArg, ThatArg)
Then, whenever that item is pulled up, it calls ThisFunction utilizing ThisArg and ThatArg as arguments...
Can someone help me...?
Thanks in advance...