Macro and If statements

Year5885

New member
Local time
Today, 08:53
Joined
Dec 10, 2012
Messages
1
Hi,

I need to know how to run a macro in an if statement. This will be used in the scenario following:

There are a few different username and password, and every different pair of username and passwords need to link to different pages. So what I need to happen is if one username and password is entered then it goes to one page, but if a different username and password are entered then it goes to another page.

Please feel free to comment below, anything will be a help

Thanks.
 
Hello and Welcome to AWF.. :) Happy to have you on board..

Well I am not sure what you exactly mean by Pages here.. Is it Forms? If they are Form why do you need a Macro? You can use the DoCmd.OpenForm..

There are several Login forms that are available here on this Forum.. That mimics the way you want to do things.. Do a quick search..

If I have got your requirement completely wrong please do let me know by giving another shot at explaining..

EDIT : I wrote this sample a few weeks/months ago for another user.. Since I do not have access on my laptop so I am unable to actually edit it.. I do not even remember what/how it works either.. but should give you a rough idea.. Post back if in trouble..
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom