Help! Auto Populate Form Buttons and functions

  • Thread starter Thread starter mattmu
  • Start date Start date
M

mattmu

Guest
Anybody have any Ideas, examples, links.

I want to create a simple pos and would like to have the form be updated by what is stored in a table.

Example: Form1 has 3 buttons 1 button for Vodka Rings up for $5. 1 button for Rum Rings up $5. 1 button for Frys Rings up for $2.

This is easy to do if I want to be the only one able to add buttons I want be able to add a button to Form1 by filling out form2 which records what the button are for and how much to charge etc... This form writes these variable to a table which controls what buttons are displayed on the Form1 when it is loaded.

This way form1 can have anywhere from 1 to 100 differnt buttons and they are all maintained in one table for easy addition and removal.

Table example:
ButtonCaption: Vodka
Cost: 5
Size: ??
etc...

Any information on how to go about creating a form which can accomplish this would be greatfull. I assume it would need to be written using VBA however I have not been able to find a solution.

Thanks :)
 
Last edited:
Since you don't know how to code, why not stick to the no-code solution. Use a combo on a subform. You can have as many choices as you want. You would create a table with the drink types and their cost and that table would be used to populate the combo's RowSource.
 
A combo box is too simple and would not be practical for a touch screen application. I do know how to code some things and have most of my coding in web applications such as php/oralce/plsql. I havn't worked in Access in a long time. All I need is an example of how to do one or where I can find an example and I can take it from there.

Thanks.
 
i'd be interested in hearing someone's answer on how to do this. i'm in the same situation, and knowing how to auto create buttons based on table info would be the bee's knees.


cheers,

b_c
 
i'm still interested in hearing anyone's ideas on this. i have the query...just need the logic for the form to populate buttons based on the results of the query...i.e. runqty > 0

anyone wanna help a good guy out?


cheers,

b_c
 
It would seem that you are trying to reinvent the wheel. Why not go with an off the shelf solution? Of which I'm sure there are plenty.
 
It would seem that you are trying to reinvent the wheel. Why not go with an off the shelf solution? Of which I'm sure there are plenty.


think i figured out something...let me know your opinion.


have the query created to limit choices in the backend...the form is a "continuous" multi-item form in access2007. i deleted all fields that populated through the except for the "invName" field and the "invID" field of which is hidden...

so the user clicks the button for the menu...and the multi-item form populates per the query criteria...then all the user has to do is "click" the inventory name (which is tied to an event) to register the item where i need it via the macro or vba programming.


so simple, but yet i feel like i lost some brain cells over this.


b_c
 
oh, followup q...

...how do you make a form "page setup" so that you have 3 columns instead of one in that continuous form?
 
There are a number of thing you are going to have to consider.

I'm imagining creating the button is going to be the relatively easy part (I've not tried and have no intention of trying). Now the interesting bit, you have to place the button on the form, you need to determine where there is space on your form to place the button. You also need to consider what happens with new buttons do you just stick them in the next available location, or do you re-sort all your buttons so that they are in some meaningful order. What happens when you decide to remove buttons?

Now if you manage to achieve all that you will finally need to embed some meaningful code in the buttons OnClick event.

You might like to read the advise given here to a similar question.

Get back to use when you have a working sample, although I dare say that if you achieve all that you will want to monetise the application that you produce, so you won't be sharing it here ;)
 

Users who are viewing this thread

Back
Top Bottom