Solved

set caption on button on continuous form as data field

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 5 53
How Do I Select a Record using a Primary Key 3 29
trying to catch ODBC error when database opens 2 27
Opening forms with an input box 5 19
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

776 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