Access World Forums

Access World Forums (
-   Forms (
-   -   Access button select form (

tatiarends 04-14-2014 06:47 AM

Access button select form

I have been trying to make this form that I want to create work but seems like I can't really get anywhere, seems like a fairly simple task though

I want to create a form with a field that has a "popup" button (just like the calendar one) This popup would open a matrix where each cell is a button, ex: A1, A2, A3, A4, B1, B2, etc..... The user would then click on whichever cell they want, lets say he clicks cell C3, and then the name of the cell would appear in the field on the form, that is the field would now be populated with the text "C3"

I'm very new with this, so please be specific with what steps to take.

Thank you

spikepl 04-15-2014 10:20 AM

Re: Access button select form
You are asking for something very unusual in Access, and you are using an Excel-term like "cell" which does not exist in Access.

Explain what the ultimate functional point of all this is (rather than just the mechanics of what you are attempting to do) and someone might help you.

tatiarends 04-16-2014 05:24 AM

Re: Access button select form
You're not understanding what I meant by "matrix" and "cell" Nothing to do with excel or any table. What I want to make is a popup menu with buttons to select, it just happens that the options are from a matrix. The user is filling out a form, the form has a field that has a button which opens a popup menu (just like the calendar) and that menu has many options to choose from, instead of cells call them coordinates A1, A2, A3, A4, B1, B2, B3, B4 and so on. From there, the user then clicks the option they want, lets say C3, and that option appears (literally I just need the text "C3") in the field.

The reason I need this instead of a combo box is because the user needs to answer that field based on what coordinate applies to him, and it depends entirely in visual locations, just seeing options in a list does not work.

tatiarends 04-16-2014 11:58 AM

Re: Access button select form
Nevermind, I figured it out. Thanks anyways

ngsabath93 07-01-2014 05:58 AM

Re: Access button select form
How did you do this - I need to do the exact same thing!

tatiarends 07-01-2014 06:53 AM

Re: Access button select form
First I created my main form, lets call it "Mainfrm". I created a text box for where I needed the result of the selection to appear, this textbox must also have as Control Source the table field where you need the results to be stored, let's call it "Coordinate".

I then created another form Matrixfrm (the popup menu) with command buttons each labeled accordingly A1, A2, A3 etc and also make sure the name of the button are those too, this is very important. I created a textbox on that form and labeled it Coordinate and also made the Control Source of that textbox the same as the field in my table, just like I did on Mainfrm. I also made the textbox not visible. Then, for each button of my matrix I put on the On Click event this code:

Private Sub A1_Click()
Me.Coordinate = "A1 - Very High"

On Error GoTo Err_A1_Click


Exit Sub

Resume Exit_A1_Click
End Sub

That is for when button A1 is clicked. You must use the same code for each button but changing the labels This code also makes Matrixfrm to exit upon clicking any button, so if you do not want this automatic closing, delete the Exit_A1_Click and below from your code.

This should make your textbox on Mainfrm appear with the result of what you clicked on Matrixfrm.

Hope this helps!

All times are GMT -8. The time now is 04:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World