I want to use temporary information from an unbound textbox, but i cant seem to run any code on an unbound textbox. Is this possible. I have it working with a bound "control" but cant seem to make it work with an unbound control.
8 3871 ADezii 8,834
Recognized Expert Expert
You can easily retrieve information from an 'Unbound' Text Box in the same fashion as a 'Bound' Text Box. The only difference is that, not to be redundant, it is not Bound to a Field.
Hi, and Welcome to Bytes.
You don't really provide us with much information here. Unbound controls can be accessed like any other and their contents can indeed be processed in code. But the values of unbound controls cannot be stored (as they are not bound to any underlying fields) so they are inherently volatile.
Unbound controls on a continuous form (or a datasheet view) also behave differently to bound controls, as the value of the control is not tied to each record. The set of controls displayed in a continuous form or datasheet view is really just one set, repeated on-screen for as many record rows as the screen can display. Unbound controls shown in such lists remain at whatever value they were last set to, showing on-screen as repeating the same contents for the whole list. Accessing the value of the unbound control in such circumstances is likely to yield disappointing results.
-Stewart
Thanks for such fast responses. Here is what i have.
When i try to build an event for the unbound box, it doesnt automatically start the sub for me. So what i did was used the name of the unbound field (text35) in the line for the code so the code starts like this
Private Sub text35_afterUpd ate()
when i open the form i get this error
the LinkMasterField s property setting has produced this error:"Ambiguou s name detected: text35_afterupd ate'
I dont want the information to be bound to a field because i dont want the data stored, I appreciate any help that you can provide.
"Ambiguous name detected: text35_afterupd ate" usually means that you have two subs with this same name, which isn't allowed! Check your code to see if this is true.
Linq ;0)>
thanks, sorry for the problems
ADezii 8,834
Recognized Expert Expert
thanks, sorry for the problems
It's not a problem, just try to be a little more clearer on what you are requesting. For starters:
When i try to build an event for the unbound box, it doesnt automatically start the sub for me.
What exactly do you mean by this statement?
- Private Sub text35_afterUpdate()
The fact that the A in AfterUpdate isn't capitalized, your statement
When i try to build an event for the unbound box, it doesn't automatically start the sub for me.
and the fact that you apparently had more than one copy of this sub (hence the "ambiguous" error) makes me think that you are entering your code "freehand" which is to say typing all of the code, rather than selecting the control, going to Properties - Events, clicking on the desired event and going into the code window thru this route. If you're entering code without going thru this routine, it would explain a lot of your problems.
Linq ;0)>
When i stated 'sorry for the problems' it was because i did have more than 1 event for the name. Once i got rid of the extra entries the code ran fine.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: MLH |
last post by:
Would like to examine the value entered into a textbox
on an A97 form during the BeforeUpdate event. The
textbox may or may not have had an earlier entry in it
prior to the latest value that is now in the process of
being entered. What's the best way to refer to the
value just typed that is about to update the textbox?
|
by: Steve |
last post by:
I have a datagrid in a WinForm.
When the user edits an entry in the datagrid, after he leaves that field, I
would like to do some cheking. What event fires when the user does that?
I need to make sure that the value he modified does not create a dup value
in my DB.
Thank you for your help,
Steve
|
by: Matthew |
last post by:
All,
I have searched google and the newsgroups but can't find anything the
same as what I am experiencing (though I may have missed something).
I have controls (textboxes) within UserControls which are not behaving
as I would expect. Specifically, if there is a command button external
to the usercontrol which is activated by a shortcut key (eg Alt-B),
the command button Click event handler code 'executes' even though the
textbox set...
|
by: Gary Shell |
last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852 (http://support.microsoft.com/kb/810852), but then I realized that the hotfix mentioned was in .Net v1.1, which I am using.
I took the sample from that article and recreated the situation I see in my application. (Code included below.)
If you run the...
|
by: Lenster |
last post by:
Environment
---------------
Visual Studio.NET 2003 Version 7.1.3088
..NET Framework 1.1 Version 1.1.4322 SP1
XP Professional 5.1.2600 SP2 Build 2600
Problem Description
-----------------------
I have an mdi parent form.
| |
by: Robert |
last post by:
Every thing worked fine until all of a sudden, I get the following error
whenever I try to do anything on one of my forms that calls an Event
Procedure. I get the error as soon as the form opens because I have an
OnLoad event. If I take that out the form will open but I will get the same
error if I attempt anything else that will call and Event Procedure. I am
not having any issues with any other forms.
Error is:
The expression On...
|
by: colleen1980 |
last post by:
Hi: There are two textboxs in my main form. One is bound and another is
unbound. There is no entry in the unbound textbox as values come into
automatically after entering some information in the subform. My
question is how to i pass values from unbound textbox to bound textbox
every time when the value change in unbound textbox i need to change
the value in the bound textbox. When the form load there is already
value in the bound textbox...
|
by: Richard |
last post by:
How is the result of query placed in a unbound textbox ?
Suppose
CriteriaLookups has columns TableName, KeyColumn, KeyValue,
DataColumn
Foo,x,11,xhat
Bar,z,3,xyzzy
And
|
by: Jim Devenish |
last post by:
I have an unbound form that displays all the days of the year as a
calendar. It has 12 rows of text boxes with either 29,30 or 31 in
each row. Text box names are of the form: display_01_01,
display_01_02 ... display_12_31.
This is used to display bookings of holiday properties and works
well. I am now wishing to be able to highlight a range of dates by
double clicking in one text box and then in another, highlighting all
the dates...
|
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |