Solved

set caption on button on continuous form as data field

Posted on 2013-07-01
5
1,490 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now