By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,130 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

Switchboard: Entering data on many forms for 1 client

P: 99
Ok.

I am trying to plan ahead on how to make my DB the most effective. I’ve decided to use a Switchboard for this. So I know the basic principles of them as well as how to make 1. What I need help with is a control on it. My DB deals with clients, which will have to have information entered into forms for each 1. There is going to be something like 20 forms? Maybe a little less. I want to make the switchboard have a little button: Enter Information (original isn’t it). When this is selected, it will show all the links to the forms.

Issue: I want to have something where when this part is opened, the person can select the ClientID. Then for every link to the forms afterwards, it will open that specific client. Until a new client is selected in the same manner. (Without this, when the forms are opened, they will show all clients, and you will have to scroll through all the records to get the 1 you want. (There will be anywhere from about 100-2000 clients).

So, is this possible? Any other ideas or suggestions on how to accomplish this in this manner, or in a different 1 that will result in the same solution are welcome. Thanks for the help guys (and girls).
Dec 11 '06 #1
Share this Question
Share on Google+
9 Replies


NeoPa
Expert Mod 15k+
P: 31,660
As long as you have a globally available variable (or function) that you can access, the Filter properties can always reflect the client chosen.
Another alternative is to pass it in the 'OpenArgs' parameter to every form opened.
Dec 11 '06 #2

P: 99
Ok, is a globally available variable like a ClientID? If so, then I believe that I have 1. If not, then would you elaborate. The other option would work as well. Whichever ya’ll recommend is what I will try to use. Thanks.
Dec 11 '06 #3

NeoPa
Expert Mod 15k+
P: 31,660
Ok, is a globally available variable like a ClientID? If so, then I believe that I have 1. If not, then would you elaborate. The other option would work as well. Whichever ya’ll recommend is what I will try to use. Thanks.
If you create a Public function in a module you can get it to set and/or return a variable.
This will be visible to both VBA code and SQL.
I'm not sure, thinking about it, that I ever got a Public variable to work properly.
OpenArgs introduces more work and maintenance.
Dec 12 '06 #4

P: 99
If you create a Public function in a module you can get it to set and/or return a variable.
This will be visible to both VBA code and SQL.
I'm not sure, thinking about it, that I ever got a Public variable to work properly.
OpenArgs introduces more work and maintenance.
Ok, based off another thread I have going, (Navigating through Forms, Based on controls) I know that the Global Variable is set up in a module. I am in the process of trying to create an Global Variable for Clients, so if that is the same as what would be needed here, I may want to go that route since then I would be using the same principles for my DB. But again, I am an open person. It sounds like Openargs would be more work to keep working, so if at all possible, I would like to avoid that method. Let me know what you think would work best and I'll give it a shot
Dec 12 '06 #5

NeoPa
Expert Mod 15k+
P: 31,660
If you find that you can get a Global (Public) variable to work for you then this is your easiest route.
If not, then a Public Function will have to do (can provide further help if required).
Use OpenArgs only if it logically warrants it (maybe a paired couple of forms or something similar).
In short, you want to use a Public variable.
Dec 12 '06 #6

P: 99
Let’s make sure I understand. A Global Variable would be created in a module:

Option Compare Database

Global coClient As String
Next I need to create some sort of selection/entry for the ClientAutoID. On this form I would set code to something like this:

Private Sub ClientSelection_Click()
coClient = Me.ClientAutoID
End Sub

This allows for Access to “remember” the clienautoId I selected and any forms opened after this should go to this client?

How would you de-select the client and choose someone else? I checked out this website and will do some more research before trying to create 1.

[/link: http://www.blueclaw-db.com/access_da...l_variable.htm]
Dec 13 '06 #7

NeoPa
Expert Mod 15k+
P: 31,660
Let’s make sure I understand. A Global Variable would be created in a module:

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2.  
  3. Global coClient As String
Next I need to create some sort of selection/entry for the ClientAutoID. On this form I would set code to something like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub ClientSelection_Click()
  2. coClient = Me.ClientAutoID
  3. End Sub
This allows for Access to “remember” the clienautoId I selected and any forms opened after this should go to this client?

How would you de-select the client and choose someone else? I checked out this website and will do some more research before trying to create 1.

[/link: http://www.blueclaw-db.com/access_da...l_variable.htm]
Robert, If you check on that web link you'll see they define the variable using Public rather than Global. Global is from an earlier version and only provided for compatibility.
Expand|Select|Wrap|Line Numbers
  1. Private Sub ClientAutoID_AfterUpdate()
  2. coClient = Me.ClientAutoID
  3. End Sub
Is where you want the trigger for the update.
coClient must not be defined in the form's module.
Dec 14 '06 #8

P: 99
Robert, If you check on that web link you'll see they define the variable using Public rather than Global. Global is from an earlier version and only provided for compatibility.
Expand|Select|Wrap|Line Numbers
  1. Private Sub ClientAutoID_AfterUpdate()
  2. coClient = Me.ClientAutoID
  3. End Sub
Is where you want the trigger for the update.
coClient must not be defined in the form's module.
Very cool. It will take probably take me a little while before I'm able to test this properly. I'll let you know how it wokrs out when the time comes.
Dec 14 '06 #9

NeoPa
Expert Mod 15k+
P: 31,660
Very cool. It will take probably take me a little while before I'm able to test this properly. I'll let you know how it wokrs out when the time comes.
No Problem - Yes feedback is always welcome.
Dec 14 '06 #10

Post your reply

Sign in to post your reply or Sign up for a free account.