Without using SQL (1 Viewer)

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
I have a form that I am needing to add a message box it a certain item is chosen from a combo box, without using SQL. I have the form open in design view, in the property of the combo box field. Any help is very appreciated!!
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
Hi. Not sure what you mean by "without using SQL." The MsgBox() function is not SQL. Have you tried using a MsgBox to display the message?
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 23:07
Joined
Jan 23, 2006
Messages
15,394
A little more info please. What would you like in this msgBox?
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
I have a form that I am needing to add a message box it a certain item is chosen from a combo box, without using SQL. I have the form open in design view, in the property of the combo box field. Any help is very appreciated!!
I am not a programmer, and do not know SQL very well. So in the property of the combo box I am wanting a message to come up if “hotline” was chosen to bring up a message that says “input Tier in the tier field”
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
I am not a programmer, and do not know SQL very well. So in the property of the combo box I am wanting a message to come up if “hotline” was chosen to bring up a message that says “input Tier in the tier field”
Hi. Sounds like your calling "code," SQL. Okay. When we hear "code," we think of VBA. So, to display a message, you can use either VBA or a macro. Sounds like you would like to use a macro. If so, in the AfterUpdate event of your Combobox, click on the three dots (ellipsis ...) and select Macro Builder. Then, look for the MessageBox action. You would also need the If action to test what the user selected from the dropdown.
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
Hi. Sounds like your calling "code," SQL. Okay. When we hear "code," we think of VBA. So, to display a message, you can use either VBA or a macro. Sounds like you would like to use a macro. If so, in the AfterUpdate event of your Combobox, click on the three dots (ellipsis ...) and select Macro Builder. Then, look for the MessageBox action. You would also need the If action to test what the user selected from the dropdown.
A little more info please. What would you like in this msgBox?
By selecting the responsibility field in design view, I put the msg box in the After Update on the property sheet. I only want the message to come up when Hotline is chosen - what would the If statement be and where in the design property sheet would I put it? All help is VERY appreciated.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
By selecting the responsibility field in design view, I put the msg box in the After Update on the property sheet. I only want the message to come up when Hotline is chosen - what would the If statement be and where in the design property sheet would I put it? All help is VERY appreciated.
Hi. No, you don't put MsgBox() in the property itself. Leave it blank and just click on the three dots next to it (to the right). You would then select Macro Builder from the option window that shows up.
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
Hi. No, you don't put MsgBox() in the property itself. Leave it blank and just click on the three dots next to it (to the right). You would then select Macro Builder from the option window that shows up.
Got it thank you - really appreciate the patience and help. Now is there a way from choosing from the drop down box, if the selection is “hotline” to bring up the message box. the message box is to remind the user to go to the next field over and fill out what “tier” of the hotline the person is on. I believe someone said it would be an “if statement...” so not knowing a lot of VBA where and how would I do that?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
Got it thank you - really appreciate the patience and help. Now is there a way from choosing from the drop down box, if the selection is “hotline” to bring up the message box. the message box is to remind the user to go to the next field over and fill out what “tier” of the hotline the person is on. I believe someone said it would be an “if statement...” so not knowing a lot of VBA where and how would I do that?
Hi. Yes, I mentioned the If action, which is available in a macro, so you don't have to use VBA. From the macro action dropdown, do you see the If action as an option?
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
Hi. Yes, I mentioned the If action, which is available in a macro, so you don't have to use VBA. From the macro action dropdown, do you see the If action as an option?
Just getting back to work. Let me check... thank you
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
Ok the message box is coming up, very nice. I honestly think that is what they are wanting. I do see the IF in the macro on click option. What would I put there? Thank you for your patience
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
Ok the message box is coming up, very nice. I honestly think that is what they are wanting. I do see the IF in the macro on click option. What would I put there? Thank you for your patience
Hi. You could try something like:

Code:
If [ComboName]="hotline"
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
Ok the message box is coming up, very nice. I honestly think that is what they are wanting. I do see the IF in the macro on click option. What would I put there? Thank you for your patience
I am thinking....If primary responsibility equals hotline then run the macro. Alerting them to pick a tier? if that is correct I don’t know how to write it on the macro.
Hi. You could try something like:

Code:
If [ComboName]="hotline"
can I set warnings off before the if statement?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
I am thinking....If primary responsibility equals hotline then run the macro. Alerting them to pick a tier? if that is correct I don’t know how to write it on the macro.

can I set warnings off before the if statement?
Hi. In the macro, you can select all the actions you need and arrange them in any order necessary (based on your logic requirements). So, yes, you can set the warnings off too.
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
OMGness... you are genius!! It worked it looks great. Thank you for having patience with me especially not knowing the difference between SQL vs VBA. I REALLY appreciate all your help!! THANK YOU
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:07
Joined
Oct 29, 2018
Messages
21,542
OMGness... you are genius!! It worked it looks great. Thank you for having patience with me especially not knowing the difference between SQL vs VBA. I REALLY appreciate all your help!! THANK YOU
Hi. It was all you! Congratulations! Good luck with your project.
 

QueryStumped

Registered User.
Local time
Yesterday, 23:07
Joined
Mar 22, 2017
Messages
60
Hi. It was all you! Congratulations! Good luck with your project.
I do have one more question, how can I make this DB for multi users? It’s on a shared drive and under options, advanced it shows default open mode shared, edited record.
 

Users who are viewing this thread

Top Bottom