473,796 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing Unbound Field Name

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
Nov 13 '05 #1
5 2946
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 "MyOtherFor m", acDesign
Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"
DoCmd.Close acForm, "MyOtherFor m", 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

Nov 13 '05 #2
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_djsteel e@NOSPAM_canada .com> wrote in message
news:DI******** ************@ro gers.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 "MyOtherFor m", acDesign
Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"
DoCmd.Close acForm, "MyOtherFor m", 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


Nov 13 '05 #3
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_djsteel e@NOSPAM_canada .com> wrote in message
news:DI******** ************@ro gers.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 "MyOtherFor m", acDesign
Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"
DoCmd.Close acForm, "MyOtherFor m", 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


Nov 13 '05 #4
My code changes the name of the control:

Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"

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_djsteel e@NOSPAM_canada .com> wrote in message
news:DI******** ************@ro gers.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 "MyOtherFor m", acDesign
Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"
DoCmd.Close acForm, "MyOtherFor m", 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



Nov 13 '05 #5
Thanks Doug it works fine now

Dave

"Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in message
news:Yb******** ************@ro gers.com...
My code changes the name of the control:

Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"

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_djsteel e@NOSPAM_canada .com> wrote in message
news:DI******** ************@ro gers.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 "MyOtherFor m", acDesign
Forms("MyOtherF orm").Controls( "Text1").Na me = "101Comment s"
DoCmd.Close acForm, "MyOtherFor m", 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



Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2588
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 bind data from your project with this field..." regarding unbound fields. I cannot find where this is explained anywhere in the book I want to assign a string to an unbound field in my Crystal Report and I can't figure out the code This is...
11
17332
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 text string) to a table. I'm thinking the best way to do this is to use a Make Table query -- that way the table stays small -- one row -- and there is less chance for something to get overwritten. But how to create a make table query from...
6
1894
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 suppored by an updatable query (linked to a table). I would rather not use a query approach because it will result in a need for a new form and will create its own complications (although this could be done) I would like to make the change so that it...
2
2287
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 then the text doesn't get saved. It's like the text isn't there until focus is moved off the field. So does anyone know how to grab the contents of an "uncommitted" field without moving the focus? By the way, I tried moving the focus away,...
0
1551
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. Basically I'm coming up with a duration between 3 sets of dates (subtracting off hours - eve, lunch, weekends, holiday) and coming up with the number of seconds. In the detail list I can easily print the value of n days, n hours, n minuts, n...
2
14125
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 I clear the contents of the form immediately once either one of the command buttons are pressed. I either want to do this **or** clear the contents of the look-up field whenever it is clicked or tabbed into. I have a fairly limited knowledge of...
8
5412
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 name, that my lovely predecessor left there for me. This field is used in a great many of the queries, reports and forms that we have here for this database. So, I was wondering if there is a way to change that field name and have all the...
3
14294
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 about how to find Sum from a subform field. based on that, i stored the total value in an unbound field. i dont know how to assign the value from the unbound field to a bound field , Total, in the main form.
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9524
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10168
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9047
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.