Buttons on pictures (1 Viewer)

equaliser

Registered User.
Local time
Today, 05:24
Joined
Jun 4, 2005
Messages
59
Hi yet another post about a DB I'm constucting for work. I have a table of area descriptions of a part. With currently a drop down menu to choose from.

As there are nearly 80 areas i want to make it as easy as i can for inspectors to choose the areas.

I've put in a picture of the part and want to attach buttons to the part. Once clicked i want the buttons to put in the appropiate area desciption into the areas table or field on my form. Whats the best way of going about this do i put code into the 'on click' box in button properties. What code would you recomend.

Many thanks to anyone who helps

cheers

EQ
 

rborob

Registered User.
Local time
Yesterday, 21:24
Joined
Jun 6, 2006
Messages
116
Depending on the box clicked i assume you'll be having a button next to every picture? if this is the case you just need to assign An Area name to each button then assign it to the Area field in the on_click event. Since each area will be unique to each button just freehand the area names in code

Me.txtArea = "SomeArea"
 

equaliser

Registered User.
Local time
Today, 05:24
Joined
Jun 4, 2005
Messages
59
rborob said:
Depending on the box clicked i assume you'll be having a button next to every picture? if this is the case you just need to assign An Area name to each button then assign it to the Area field in the on_click event. Since each area will be unique to each button just freehand the area names in code

Me.txtArea = "SomeArea"

Thanks for replying. This worked!!!!!!! but only for the first record.

I have a form bound to the fault table. On which is the area field. There is a button on the field which when clicked opens a form with a picture on. I want to be able to click a button to select an area and place it directly into the form i had open. I've bound the picture form to the 'fault table' as it was the only way I could see the 'fault table' fields. As i said the code you gave me works but places it in the very first record in the 'Fault table' and wont work on any others.

cheers EQ
 

rborob

Registered User.
Local time
Yesterday, 21:24
Joined
Jun 6, 2006
Messages
116
your putting the text onto another form? then use

Forms!"yourformname"!"destinationtextbox" = Me.txtArea
 

Users who are viewing this thread

Top Bottom