Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-14-2014, 06:47 AM   #1
tatiarends
Newly Registered User
 
Join Date: Apr 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tatiarends is on a distinguished road
Access button select form

Hi,

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

tatiarends is offline   Reply With Quote
Old 04-15-2014, 10:20 AM   #2
spikepl
Eledittingent Beliped
 
spikepl's Avatar
 
Join Date: Nov 2010
Location: San Serriffe
Posts: 6,144
Thanks: 77
Thanked 980 Times in 958 Posts
spikepl is a jewel in the rough spikepl is a jewel in the rough spikepl is a jewel in the rough
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.
__________________

Don't tell us what did not happen.
Do you tell the mechanic about your car "it doesn't work" or vague stuff like:
I couldn't, No joy, To no avail, No go
, Incorrect, Wrong, Seems, Without success, It didn't let me, I/it failed.

Do tell us what did happen
:

I want this ... to happen, I attempted this ..., using this ... code and pressing these buttons, the system did this ... in response, and I got this ... error in this ... line.

Did it help? Pass it forward!

Joys of Access:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

spikepl is offline   Reply With Quote
Old 04-16-2014, 05:24 AM   #3
tatiarends
Newly Registered User
 
Join Date: Apr 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tatiarends is on a distinguished road
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 is offline   Reply With Quote
Old 04-16-2014, 11:58 AM   #4
tatiarends
Newly Registered User
 
Join Date: Apr 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tatiarends is on a distinguished road
Re: Access button select form

Nevermind, I figured it out. Thanks anyways
tatiarends is offline   Reply With Quote
Old 07-01-2014, 05:58 AM   #5
ngsabath93
Newly Registered User
 
Join Date: Jun 2014
Posts: 48
Thanks: 3
Thanked 0 Times in 0 Posts
ngsabath93 is on a distinguished road
Re: Access button select form

How did you do this - I need to do the exact same thing!
ngsabath93 is offline   Reply With Quote
Old 07-01-2014, 06:53 AM   #6
tatiarends
Newly Registered User
 
Join Date: Apr 2014
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tatiarends is on a distinguished road
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

DoCmd.Close


Exit_A1_Click:
Exit Sub

Err_A1_Click:
MsgBox Err.DESCRIPTION
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!

tatiarends is offline   Reply With Quote
Reply

Tags
button , click , form , popup , select

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The enter button does not select the command button. ariansman Forms 3 04-07-2012 05:55 AM
Code for Cmd button to select tab page on form? Goli Modules & VBA 5 05-09-2008 07:29 AM
How can I use a Form button or tab into a field to browse a table & select garnf1 Forms 1 10-23-2007 10:05 AM
Using a button in a form to either select or unselect several check boxes 10scn General 1 10-17-2007 11:59 AM
Use an Option Button on a Form to select an alternate Input Mask Blue Karma Forms 1 09-25-2006 12:00 PM




All times are GMT -8. The time now is 09:54 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


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