By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,153 Members | 2,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,153 IT Pros & Developers. It's quick & easy.

Event procedure on 'unbound' textbox

P: 31
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.
Aug 21 '08 #1
Share this Question
Share on Google+
8 Replies


ADezii
Expert 5K+
P: 8,669
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.
Aug 21 '08 #2

Expert Mod 2.5K+
P: 2,545
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
Aug 21 '08 #3

P: 31
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_afterUpdate()

when i open the form i get this error

the LinkMasterFields property setting has produced this error:"Ambiguous name detected: text35_afterupdate'

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.
Aug 21 '08 #4

missinglinq
Expert 2.5K+
P: 3,532
"Ambiguous name detected: text35_afterupdate" 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)>
Aug 21 '08 #5

P: 31
thanks, sorry for the problems
Aug 21 '08 #6

ADezii
Expert 5K+
P: 8,669
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?
Aug 21 '08 #7

missinglinq
Expert 2.5K+
P: 3,532
Expand|Select|Wrap|Line Numbers
  1. 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)>
Aug 21 '08 #8

P: 31
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.
Aug 22 '08 #9

Post your reply

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