473,320 Members | 1,939 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,320 software developers and data experts.

Changing a caption in a form.

489 256MB
I'm trying to change a caption in a form when I step through the code I see that the caption field is changed but when the code is finished and I look at the form that caption field isn't changed.
Here's the code I'm using
Expand|Select|Wrap|Line Numbers
  1.   DoCmd.OpenForm "versionnumber", , , , acFormEdit, acHidden
  2.         VVersion = [Forms]![versionnumber]!verNumber.Caption
  3.         Forms!versionnumber.verNumber.Caption = "Version 20"
  4.         DoCmd.Close acForm, "versionnumber", acSaveYes
  5.  
When I was stepping through the code I had taken the acHidden out so I could see the form. I'm using access 2007
I'm getting the original version number and then wanting to change it.
What am I doing wrong?
Any help would be appreciated.
Sep 23 '12 #1

✓ answered by TheSmileyCoder

Have you tried opening the form in design view? acFormEdit is for editing records in the form.

6 4874
TheSmileyCoder
2,322 Expert Mod 2GB
Have you tried opening the form in design view? acFormEdit is for editing records in the form.
Sep 23 '12 #2
CD Tom
489 256MB
That did it, thanks for your help
Sep 23 '12 #3
TheSmileyCoder
2,322 Expert Mod 2GB
Glad to hear it worked for you.

Can I just ask what practical application you have for doing it like this? At least the way you posted it seems a rather long way to go, to do something simple.
Sep 24 '12 #4
CD Tom
489 256MB
I have an application that goes through a conversion that only needs to be done once. By changing the version number I know that I don't have to go through that conversion again. Don't know if this was the best way but it works.
Sep 24 '12 #5
TheSmileyCoder
2,322 Expert Mod 2GB
I have a version control system I have been intending for ages to write an article about, which is entirely built within MS access, that allows for easy distribution on LAN of new clients.

Would that be of interest?
Sep 24 '12 #6
CD Tom
489 256MB
Yes that would be very interesting. I don't know how others feel about it but I would like to see it.
Sep 24 '12 #7

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

Similar topics

1
by: Matt | last post by:
Hi group, Here's a problem I've been trying to solve for the past several weeks. I have the standard WebBrowser object added to a form so it can access websites, and I have it load a default...
3
by: Alex | last post by:
This may sound like a simple question but I really dont' know how to do this. I know you can call a Form Variable in a VBscript using Request.Form("FieldName") and make equal a local variable...
1
by: Max Harvey | last post by:
Hi, I made up a nice little form which had its own sub form in it. I made a litle VB code so that when I pressed a button it would move form the form (frmConference) to the subform...
2
by: John Dann | last post by:
In VB.Net I have a Form1 main form that instantiates various class objects. I want to change eg the title text of Form1 from within one or more of these classes. The solution kindly suggested...
1
by: S. van Beek | last post by:
Dear reader, I can change the caption content of a field in a Form with the following VBA code: Rst!<FieldName>.Caption = "<NewCaptionContent>" But if I do the same in a Table the...
3
by: Kobi.Pinhasov | last post by:
Hello, I'm using HttpModule to capture requests to the web server. Before processing the page I'd like to check the values contained in some keys of the Request.Form collection and according to...
1
by: psychofish25 | last post by:
When making a form with Tkinter, the caption for the form is always "tk." I was wondering how I could access the form's Caption property and change it, just as I would for a button.
5
Ali Rizwan
by: Ali Rizwan | last post by:
Hi everybody I want to change color of button's caption in vb6 i tried but couldnt succeed. How can i change the color of a commandbutton's caption Thanx
4
by: questionit | last post by:
Hi everyone I want to open a form as a Dialog and then i want to change the form controls' property e.g make a textbox disabled etc. I've tried various ways but dont seems to work. I was...
8
Megalog
by: Megalog | last post by:
Hey guys.. my turn to ask a question: I'm having a weird issue with a form I've reworked. This form has a combo box, which when used is changing the recordsource of a subform. This subform has...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.