calling procedures

Kenny

Registered User.
Local time
Today, 18:12
Joined
Mar 1, 2002
Messages
14
Is it possible to call a procedure from a module dependent on a value in a combo box.

e.g. There are three clients (TOM, DICK and HARRY).
Each has a different procedure that can be run only for them.
There is a combo box CmbSupplier which will have the client selected.
Based on this selection I want to call one of the procedures(TOM, DICK and HARRY).
I have tried this code but it is mince

Dim Conversion As String
Conversion = Form_fMainMenu.CmbSupplier
Call Conversion

Any suggestions?
 
Use an IF statement or a Select Case:

Select Case CmbSupplier
Case "Tom"
Call Tom
Case "Dick"
Call Dick
End Select
 
Thanks for this.

I was hoping to avoid listing all cases as we currently have arround fifty clients, however I may have no choice.
 
Rich

Can you elaborate?

just to clarify the code for each supplier is completely different. It is to import data and convert it to a standard format.

In an ideal world all our clients would supply a standard file, however most are only willing to dump a file from their own system

Cheers
 
If you want to import a file i am sure you have either a directory structure set up or a naming convention for the file(s). Why not check on that?

Regards
 

Users who are viewing this thread

Back
Top Bottom