button to update a field

green00guy

New member
Local time
Today, 10:25
Joined
Dec 30, 2009
Messages
4
Can someone point me in the direction of a tutorial to do the following

I have a continuous form that allows me to choose the supplier for a product

product name | supplier 1 | supplier 2 | supplier 3 | supplier 4 | supplier 5 |
text box button button button button button

There can only be one supplier, all updates will be done to the item
information table.

Currently I can do this with a combo box, but they are telling me to use buttons...More usable.
I am ok with using toggle button, or radio, the only rule is that there can be 1 supplier.

Thanks
 
I would suggest to search for "normalization" first before carry on with your project as having 5 supplier fields goes against the rules of normalization and you will face more problems as you go along.
 
I disagree with the concept (it won't be "more usable" when you have to add/delete a supplier), but you could populate the combo box from a button:

Me.ComboName = "Supplier1"
 
My tables are normalized.

Each item has 1 factory.

Item_table

Item#| Item Description| Item collection | Item supplier

Item_Supplier_table(It is fixed at 5 potential suppliers for strategic reasons)

Item_supplier | supplier_description | ....

I am trying to use a button to allow us to run scenarios.. quickly go through items in a collection and choose different suppliers combination's.

Thanks
 
My tables are normalized.
Well, not really, as you do have repeating fields in the Item_Supplier_table. Regardless of whether it is for "strategic reasons" or not, it still doesn't make it normalized. So, to be normalized it should be a table with RECORDS added for each instead of 5 fields.

It is that repeating field design which is going to cause pain and consternation (regardless of why you did it), in getting anything done. So, you should not be surprised by this and so you should expect a LOT of extra coding and things to get around this "strategic reason."
 
Repeating records? I think that I am not explaining myself well.

Supplier table

Supplier_code | Supplier_description | Address

1 | king products | chicago IL
2 | grey Products | detroit Mi
3 | blue Products | seattle Wa
4 | red MFG | Los Angeles CA
5 | sawmill products | San Diego CA

Each product can only have one supplier, and it must be in the list above.

Product table

Product_id | Product_desc | Product_collection |Product_Supplier
A001 |widget 1 |2009 | 1
A002 |widget 2 |2009 | 4
A003 | widget 3| 2009 | 5


I just want five buttons that will change the product supplier field to any one of the 5 options... if you hit the supplier 1 button the product_supplier field is updated with '1'
 
Did you see the code in post 3?
 
Repeating records? I think that I am not explaining myself well.

Supplier table

Supplier_code | Supplier_description | Address

1 | king products | chicago IL
2 | grey Products | detroit Mi
3 | blue Products | seattle Wa
4 | red MFG | Los Angeles CA
5 | sawmill products | San Diego CA

Each product can only have one supplier, and it must be in the list above.

Product table

Product_id | Product_desc | Product_collection |Product_Supplier
A001 |widget 1 |2009 | 1
A002 |widget 2 |2009 | 4
A003 | widget 3| 2009 | 5


I just want five buttons that will change the product supplier field to any one of the 5 options... if you hit the supplier 1 button the product_supplier field is updated with '1'
Then Paul's code should work. (and your original post was a bit confusing then).

If that doesn't work for you, post back and we'll see about other options.
 
Sweetness!!!!

Thanks Paul!!!

It works, Is it possible to Dlookup the "caption" for a button
 
Not as the property itself, to my knowledge. I suspect you'd have to set the caption properties in the form's open event.
 

Users who are viewing this thread

Back
Top Bottom