Hi all,
I freely admit I am a nitwit, so any help would be appriciated since I know next to nothing about VBA coding.
What I am trying to do is have a form with a combo box (Got this much done) with several selections, for the sake of argument let us label them 1-4. Now, what I want to have happen is for the user of said form to be able to make a 1-4 selection, then click on a button named "Go". Once this is done, I was hoping (praying, making small sacrifices) that it would be possible to have a Query run on the basis of which number was chosen (For example, if someone chose the number "1" and then hit go, it would run Query 1).
I made an attempt at this, but my VBA skills are so limited that I didn't even get passed the fieldname that would be set equal as (For example if Combo1 = "1" then etc). I kept getting an error message when trying to run the code that "Statement invalid outside type block".
I hate asking for help, and I'm going to keep plugging away... but if anyone has any suggestions, I would be greatly appriciative.
Thank you
Josh
I freely admit I am a nitwit, so any help would be appriciated since I know next to nothing about VBA coding.
What I am trying to do is have a form with a combo box (Got this much done) with several selections, for the sake of argument let us label them 1-4. Now, what I want to have happen is for the user of said form to be able to make a 1-4 selection, then click on a button named "Go". Once this is done, I was hoping (praying, making small sacrifices) that it would be possible to have a Query run on the basis of which number was chosen (For example, if someone chose the number "1" and then hit go, it would run Query 1).
I made an attempt at this, but my VBA skills are so limited that I didn't even get passed the fieldname that would be set equal as (For example if Combo1 = "1" then etc). I kept getting an error message when trying to run the code that "Statement invalid outside type block".
I hate asking for help, and I'm going to keep plugging away... but if anyone has any suggestions, I would be greatly appriciative.
Thank you
Josh