473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to change button name in subform independent

222 100+
Dear friend

Using access 2007 sp2.

I have a continuous subform. I have been creating a button on the detail area. I need to change for each record the caption of the button.

Is that possible to do it independent.

Here is an example

For record 1 button caption name = "1"
For record 2 button caption name = "2"
For record 3 button caption name = "3"

thank you in advance

regards
May 7 '10 #1

✓ answered by Jim Doherty

@wassimdaccache
Hi

Depending on your design and if I am reading you correctly (ie you dont edit in this textbox) then set the textbox tabstop property of the textbox to 'No' and locked = 'Yes'. Place a button over the text box setting its transparent property to Yes. Place any command you might have in the buttons event. That way you see whatever is in the textbox 'through' the command button but whenever they click what they might think is the textbox, it is in actual fact the button.

7 3644
missinglinq
3,532 Expert 2GB
Not on a Continuous View Form. The caption of the button on the current form would be the caption of the button on all records.

What is the purpose of this rather odd requirement?

Linq ;0)>
May 8 '10 #2
wassimdaccache
222 100+
It is a matter of design.

On the form invoice I have a subform (Item List) for each record on the subform exist a textbox. When user click on the textbox the item will be added on the invoice.

The problem is when user is clicking on the textbox it will select all the text inside and the mouse will change the shape as for adding or editing a text because it is a textbox...

User is using a touchable screen...

Can we change a textbox design to a button ?

Regards
May 8 '10 #3
Jim Doherty
897 Expert 512MB
@wassimdaccache
Hi

Depending on your design and if I am reading you correctly (ie you dont edit in this textbox) then set the textbox tabstop property of the textbox to 'No' and locked = 'Yes'. Place a button over the text box setting its transparent property to Yes. Place any command you might have in the buttons event. That way you see whatever is in the textbox 'through' the command button but whenever they click what they might think is the textbox, it is in actual fact the button.
May 8 '10 #4
NeoPa
32,556 Expert Mod 16PB
No. It's not possible. See Why Values in Unbound Form Controls do not Persist.

However, why not do something very similar to what Jim suggests? You'd need the data you want to show to be bound somewhere of course, but if you had the data available in a bound control you could simply handle the Click even of that control. A transparent button over the top is a technique that would also work of course. Without a bound control available though, any assignment of a value to the control would change every occurrence of that control, which would not be helpful to you of course.
May 8 '10 #5
I agree this is a huge problem with Access continuous forms. It's been a problem from the very beginning so I don't know if Microsoft will ever fix it.

The one thing I've done is use expressions in the continuous form so that the value is what you want the user to see for each record. You can then put a button next to it with a "..." caption and it's pretty intuitive.
May 9 '10 #6
NeoPa
32,556 Expert Mod 16PB
I don't see this as a problem at all. It is perfectly logical but it does tend to force proper database design on the database. If a database is properly designed this won't be an issue.
May 9 '10 #7
wassimdaccache
222 100+
i place a button over the text box setting its transparent property to Yes and now user is not able to select the data on the text box. I copied the code from the text box to the button.

I lost the effect of the button but it is not a problem i got what i wanted...

thanks again
May 9 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ant | last post by:
Hi, I'm a Vb6 developer just getting into .Net & I like it! But... How do I change the name of a control, say, a button, once code has been written to it. Even if I delete the old event,...
2
by: ChadDiesel | last post by:
Everyone on this group has been a great deal of help. I have another question that I could use some help with. Once again, here is a picture of my form: ...
3
by: Bonzol | last post by:
Vb.net 2003, Web application Hey all! Just a quick question. I have a site which allows users the ability to upload files by the HTML brows button control. My question is if a user submits...
2
by: cek172 | last post by:
Is there any way to change the recordsource of a subform from the mainform? I have a subform that I would like to have return data from a table based on selections from multiple checkboxes on the...
22
by: questionit | last post by:
I am trying to open Sub Form using the command below, but i am getting error. Please confirm if i can open sub form using this command: Call DoCmd.OpenForm("Forms!!", acNormal, , , ,...
3
by: fixertool | last post by:
Let's say I have this: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' some code here End Sub I need the name of the button (here...
3
by: Kelii | last post by:
I've been beating my head against this problem for the last several days, and I haven't found a decent solution yet. So I'm turning to the group for some moral support or better yet some answers. ...
4
by: tshad | last post by:
I have an executable that has a button that I want to change the name of to "Now Processing...". When the process is done, I want to change it back. The problem is that the form is not showing...
1
by: Ronny | last post by:
If I modify a property button name in my winform application I still have an old name in the designer in a certain place, while in most places it was modified automatically. The progran seems to...
8
by: mike_solomon | last post by:
I have a button <input type="submit" name="Delete" value="Delete"> This code can not be changed I want to use Javascript to change the type I tried:
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.