Hi
I seem to be getting nowhere with this. I am opening a form which will
be used to input Notes into different fields in a table. My problem is
changing the unbound field name to the field name in the associated table
that this form is based on.
Is there anyway I can do this with vba ? I am using a different button
object to open this form for the field it is to update.
button1 updates unbound field name from text1 to 101Commnets
button2 updates field name from text1 to 102Comments
etc
I have just realised that I will have to return the field name back to text1
again on completion of task
Thanks in advance for any help at all
Dave 5 2923
Can I ask "Why?" What you're describing doesn't sound like a particular
useful thing to do!
All you have to do is open the form in design mode, and change the Name
property of the control. Note that this means you can't do it from within
the form, but from another form.
DoCmd.OpenForm "MyOtherForm", acDesign
Forms("MyOtherForm").Controls("Text1").Name = "101Comments"
DoCmd.Close acForm, "MyOtherForm", acSaveYes
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"David" <da***********@btinternet.com> wrote in message
news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi I seem to be getting nowhere with this. I am opening a form which will be used to input Notes into different fields in a table. My problem is changing the unbound field name to the field name in the associated table that this form is based on. Is there anyway I can do this with vba ? I am using a different button object to open this form for the field it is to update.
button1 updates unbound field name from text1 to 101Commnets button2 updates field name from text1 to 102Comments etc I have just realised that I will have to return the field name back to text1 again on completion of task
Thanks in advance for any help at all
Dave
Doug
The reason for this is that I have had to create a form with a set of 80
date fields x 2 and also I need a notes field for each pair of date fields.
With the other fields required and the number of records possibly growing to
a couple of thousand I split the 3 fields into different tables. The notes
table therefore has 80 memo fields x possibly 2000 records.
I thought this was the way to go since I would have exceeded the number of
allowed fields in one table. Its been a headache from the start and I am
wondering now if I have done the right thing
Thanks
Dave
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:DI********************@rogers.com... Can I ask "Why?" What you're describing doesn't sound like a particular useful thing to do!
All you have to do is open the form in design mode, and change the Name property of the control. Note that this means you can't do it from within the form, but from another form.
DoCmd.OpenForm "MyOtherForm", acDesign Forms("MyOtherForm").Controls("Text1").Name = "101Comments" DoCmd.Close acForm, "MyOtherForm", acSaveYes
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "David" <da***********@btinternet.com> wrote in message news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi I seem to be getting nowhere with this. I am opening a form which will be used to input Notes into different fields in a table. My problem is changing the unbound field name to the field name in the associated table that this form is based on. Is there anyway I can do this with vba ? I am using a different button object to open this form for the field it is to update.
button1 updates unbound field name from text1 to 101Commnets button2 updates field name from text1 to 102Comments etc I have just realised that I will have to return the field name back to text1 again on completion of task
Thanks in advance for any help at all
Dave
Doug
This worked in changing the field name but it was the control name that
I wanted to change, sorry my mistake.
Thanks for your help
Dave
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:DI********************@rogers.com... Can I ask "Why?" What you're describing doesn't sound like a particular useful thing to do!
All you have to do is open the form in design mode, and change the Name property of the control. Note that this means you can't do it from within the form, but from another form.
DoCmd.OpenForm "MyOtherForm", acDesign Forms("MyOtherForm").Controls("Text1").Name = "101Comments" DoCmd.Close acForm, "MyOtherForm", acSaveYes
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "David" <da***********@btinternet.com> wrote in message news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi I seem to be getting nowhere with this. I am opening a form which will be used to input Notes into different fields in a table. My problem is changing the unbound field name to the field name in the associated table that this form is based on. Is there anyway I can do this with vba ? I am using a different button object to open this form for the field it is to update.
button1 updates unbound field name from text1 to 101Commnets button2 updates field name from text1 to 102Comments etc I have just realised that I will have to return the field name back to text1 again on completion of task
Thanks in advance for any help at all
Dave
My code changes the name of the control:
Forms("MyOtherForm").Controls("Text1").Name = "101Comments"
Are you saying that you want to bind the control to a different field? To do
that, you'd set the control's ControlSource, not its Name.
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
"David" <da***********@btinternet.com> wrote in message
news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Doug This worked in changing the field name but it was the control name that I wanted to change, sorry my mistake. Thanks for your help Dave
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message news:DI********************@rogers.com... Can I ask "Why?" What you're describing doesn't sound like a particular useful thing to do!
All you have to do is open the form in design mode, and change the Name property of the control. Note that this means you can't do it from within the form, but from another form.
DoCmd.OpenForm "MyOtherForm", acDesign Forms("MyOtherForm").Controls("Text1").Name = "101Comments" DoCmd.Close acForm, "MyOtherForm", acSaveYes
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "David" <da***********@btinternet.com> wrote in message news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi I seem to be getting nowhere with this. I am opening a form which will be used to input Notes into different fields in a table. My problem is changing the unbound field name to the field name in the associated table that this form is based on. Is there anyway I can do this with vba ? I am using a different button object to open this form for the field it is to update.
button1 updates unbound field name from text1 to 101Commnets button2 updates field name from text1 to 102Comments etc I have just realised that I will have to return the field name back to text1 again on completion of task
Thanks in advance for any help at all
Dave
Thanks Doug it works fine now
Dave
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:Yb********************@rogers.com... My code changes the name of the control:
Forms("MyOtherForm").Controls("Text1").Name = "101Comments"
Are you saying that you want to bind the control to a different field? To do that, you'd set the control's ControlSource, not its Name.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "David" <da***********@btinternet.com> wrote in message news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Doug This worked in changing the field name but it was the control name that I wanted to change, sorry my mistake. Thanks for your help Dave
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message news:DI********************@rogers.com... Can I ask "Why?" What you're describing doesn't sound like a particular useful thing to do!
All you have to do is open the form in design mode, and change the Name property of the control. Note that this means you can't do it from within the form, but from another form.
DoCmd.OpenForm "MyOtherForm", acDesign Forms("MyOtherForm").Controls("Text1").Name = "101Comments" DoCmd.Close acForm, "MyOtherForm", acSaveYes
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "David" <da***********@btinternet.com> wrote in message news:d8**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com... Hi I seem to be getting nowhere with this. I am opening a form which will be used to input Notes into different fields in a table. My problem is changing the unbound field name to the field name in the associated table that this form is based on. Is there anyway I can do this with vba ? I am using a different button object to open this form for the field it is to update.
button1 updates unbound field name from text1 to 101Commnets button2 updates field name from text1 to 102Comments etc I have just realised that I will have to return the field name back to text1 again on completion of task
Thanks in advance for any help at all
Dave
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steve |
last post by:
I know this might not be the best place to get help for this particular problem, but here goes..
The 2nd edition of ProfessionalCrystal Reports for Visual Studio .NET states "you will learn how to...
|
by: deko |
last post by:
I need to create different recordsets based on queries that use data from
unbound fields in a form. I've discovered that I can't do this, and instead
need to save the data in question (usually a...
|
by: John Baker |
last post by:
HI:
I have a situation where I wish to enter a value in an unbound field on a form and then
change the same field in each record on the form so that it reflects the value entered.
THe form is...
|
by: Dave Griffiths |
last post by:
Access 97 - I have a form with a single unbound text field. I want to have a
timer event which periodically saves the contents of that field. But I
noticed that if the focus stays on the field then...
|
by: ZRexRider |
last post by:
Hi,
I have a report driven by a SQL database. I have a populated recordset
having a user name and a number of data/time fields. I process these
time fields in the report's Detail_Print event. ...
|
by: tkhouk |
last post by:
I have a small form with two unbound look-up fields (one for an ID and one for last name). Each unbound field has a command button that actually goes to my table and brings in the records.
How can...
|
by: colemanj4 |
last post by:
Hello,
I have a field in a table that I need changed to due to
some barcode scanning software that will be using the ODBC link to
this database that does not like to work with '?' in the field...
|
by: kathnicole |
last post by:
Hi,
I am using MS Access 2007/Vista
I have a field, ProductCost in the subform. i need to find the total of ProductCost and assign it to a field, Total, in the Main Form .
I read an article...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |