Solved

set caption on button on continuous form as data field

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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 stored procedures 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 Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

708 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

18 Experts available now in Live!

Get 1:1 Help Now