Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

set caption on button on continuous form as data field

Posted on 2013-07-01
5
Medium Priority
?
1,658 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 668 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 1332 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 1332 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

715 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