Solved

set caption on button on continuous form as data field

Posted on 2013-07-01
5
1,562 Views
Last Modified: 2013-07-01
hey guys, i've got a continuous form and a button in the details section. one of the fields are called workflow sequence. i want to allow the user to click the button and change the workflow sequence numbering.

2 ways i can go about it.

1) have a workflow sequence textbox and a button saying "change workflow sequence"
2) have a button with the caption as the workflow sequence data field so that the user can directly click the button and change it. the label in the form header will be "change workflow sequence".

how do i set the caption of the button to the data field? via a UDF? thanks guys!!
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 167 total points
ID: 39289236
"how do i set the caption of the button to the data field"

Don't use a button.  Use a textbox and you can then use the controlsource property.
0
 
LVL 61

Accepted Solution

by:
mbizup earned 333 total points
ID: 39289472
What Pete said -- the button approach won't work, and a textbox's Click event can be used in the same way as a button's Click Event.

The reason you can't use a button is that it is a single control - even though it appears on multiple records - and since the caption is not a databound property, it will appear the same in all records.  This would be a workable solution in Single Form view, using the Current Event of the form to change the button caption when the user changes records... but not in Continuous Forms view where all records appear together.
0
 

Author Comment

by:developingprogrammer
ID: 39289489
i see. thanks guys!!

one last thing - i'm firing off an event when the user double clicks on the textbox now. i need to get which record the user clicked on. how do i do so?
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 333 total points
ID: 39289502
Assuming that you have an automuber (ID) or other identifying field in the recordsource, use something like this in your Click Event code:

MsgBox "Current record is: " & Me.ID

Open in new window


That's the general idea, but tailor it to make it useful in your application of course.
0
 

Author Closing Comment

by:developingprogrammer
ID: 39289791
whao guys, worked like a charm!! thanks!!!! as always!! = ))
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question