Table driven VB Commands ? 
Author Message
 Table driven VB Commands ?

I am using VB 6.0 and Access 97.

I have a project where I need to check many access tables and
spreadsheets for proper dates and figures. So what I wanted to do is
have a table driven commands. I could hard code where to look in
Excel, or have table full of commands.

I want to put the following command in a field called VBCommand

Mid(ws.Range("F1")).Value, 6, 11)

In the code, I want cCommand = myTable("VBCommand") etc . . .

Then I want to use the command in VB like this.

If cCommand = ldDate then

When I try do the above, VB sees cCommand as a text. How can I get the
software to use the command inside of cCommand?



Tue, 13 Dec 2005 03:56:16 GMT  
 Table driven VB Commands ?

Quote:

> I am using VB 6.0 and Access 97.

> I have a project where I need to check many access tables and
> spreadsheets for proper dates and figures. So what I wanted to do is
> have a table driven commands. I could hard code where to look in
> Excel, or have table full of commands.

> I want to put the following command in a field called VBCommand

> Mid(ws.Range("F1")).Value, 6, 11)

> In the code, I want cCommand = myTable("VBCommand") etc . . .

> Then I want to use the command in VB like this.

> If cCommand = ldDate then

> When I try do the above, VB sees cCommand as a text. How can I get the
> software to use the command inside of cCommand?

Without trying to use VBScript, the closest you'll get is by
storing snippets of SQL in your table, or perhaps by storing
rules in each field's and table's ValidationRule properties.

--
Joe Foster <mailto:jlfoster%40znet.com>  "Regged" again? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Tue, 13 Dec 2005 05:10:36 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Command button won't make use of module driving MS Project from MS Access 2000

2. Adding picture from internet or local drive using macro command

3. SQL Command Drive Me Crazy !!!

4. Zip Drive Eject Command

5. Cannot run remote commands from mapped drives.

6. Table-driven code (old thread) - Marsh

7. VBA Make table Query to a different drive?

8. Linked table manager to be changed from (X:\) a server drive to (C:\) a local machine

9. Psychologist needs HELP, export table to A: drive

10. Table driven "If then" statements

11. Psychologist Needs Help, Export Table to A:drive

12. How to capture data from A drive and loaded into other Database Table

 

 
Powered by phpBB® Forum Software