Thread View: pl.comp.lang.vbasic
5 messages
5 total messages
Started by Andy Duckworth
Sun, 02 Nov 1997 14:42
Help needed on updating texboxes
Author: Andy Duckworth
Date: Sun, 02 Nov 1997 14:42
Date: Sun, 02 Nov 1997 14:42
18 lines
1405 bytes
1405 bytes
Urgent help please! I have a user form in an Access 97 document that has a combo box looking up info from a table. Connected to this I have various textboxes showing related info from the database. When I change the value in the combo, the values in the text boxes change as expected. What I want is to be able to type something into the combo box and have the values in the text boxes change dynamically. Can any body help in this. I will be needing to do this in a VB5 app in the near future as well as in Access. Thanks in anticipation. email at either duckfather@dux.globalnet.co.uk or andy_duckworth@allied-colloids.co.uk Cheers Andy
Re: Help needed on updating texboxes
Author: Tony
Date: Mon, 03 Nov 1997 03:47
Date: Mon, 03 Nov 1997 03:47
32 lines
2071 bytes
2071 bytes
Try putting your code in the Change event. Only do this though if the data entered is in the listbox since you don't want to do your lookup on partial entries. Hence: - Write code to look up the text value in the listbox. - If found invoke your code that populates the textboxes. -- Later, Tony Fountain Digital Horizons, Inc. tonyfo@primenetNoSpam.com tony@dhiwebNoSpam.com Andy Duckworth wrote in message <01bce79d$c3d18060$87577ec2@duckfather>... >Urgent help please! > >I have a user form in an Access 97 document that has a combo box looking up >info from a table. Connected to this I have various textboxes showing >related info from the database. When I change the value in the combo, the >values in the text boxes change as expected. What I want is to be able to >type something into the combo box and have the values in the text boxes >change dynamically. Can any body help in this. I will be needing to do this >in a VB5 app in the near future as well as in Access. > >Thanks in anticipation. > >email at either duckfather@dux.globalnet.co.uk or >andy_duckworth@allied-colloids.co.uk > >Cheers > >Andy
Re: Help needed on updating texboxes
Author: James Coons
Date: Tue, 04 Nov 1997 04:12
Date: Tue, 04 Nov 1997 04:12
22 lines
2063 bytes
2063 bytes
I'm not 100% sure what you are expecting, but if you use the OnKeyPress event of the combo box, I think you can do what you are wanting. I assume that you don't want to wait for the user to make a selection or press [Enter] or click on the drop-down box. How this will work may depend on the AutoExpand property of the combo box, too, but I'm not totally sure. I use Access 2.0 at work and Access 95 at home and have come up with some interesting "little tidbits". Hope I have been of some help. > I have a user form in an Access 97 document that has a combo box looking up > info from a table. Connected to this I have various textboxes showing > related info from the database. When I change the value in the combo, the > values in the text boxes change as expected. What I want is to be able to > type something into the combo box and have the values in the text boxes > change dynamically. > James Coons, Programmer, Inventor-At-Large (Remove "/NOSPAM" from my eMail address to respond). "We don't sing because we are happy, we are happy because we sing" - UNKNOWN -
Re: Help needed on updating texboxes
Author: dfwcomp
Date: Wed, 05 Nov 1997 17:48
Date: Wed, 05 Nov 1997 17:48
49 lines
2249 bytes
2249 bytes
I tried this code out in VB5 Enterprise, and it worked. See if this code
will help you get on the right track:
'=====================
Private Sub Combo1_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = 13 Then
For i = 0 To 10
If Combo1.Text = Combo1.List(i) Then
Text1.Text = Combo1.List(i)
Text1.SetFocus
End If
Next i
End If
End Sub
'============================
Hope This Helps You Out.
Andy Duckworth <dux@globalnet.co.uk> wrote in article
<01bce79d$c3d18060$87577ec2@duckfather>...
> Urgent help please!
>
> I have a user form in an Access 97 document that has a combo box looking
up
> info from a table. Connected to this I have various textboxes showing
> related info from the database. When I change the value in the combo, the
> values in the text boxes change as expected. What I want is to be able to
> type something into the combo box and have the values in the text boxes
> change dynamically. Can any body help in this. I will be needing to do
this
> in a VB5 app in the near future as well as in Access.
>
> Thanks in anticipation.
>
> email at either duckfather@dux.globalnet.co.uk or
> andy_duckworth@allied-colloids.co.uk
>
> Cheers
>
> Andy
>
Re: Help needed on updating texboxes
Author: Arno Zwaag, e-office.com
Date: Thu, 13 Nov 1997 13:08
Date: Thu, 13 Nov 1997 13:08
35 lines
2097 bytes
2097 bytes
Hi, I've been looking at the answers that were given to you by Tony, James and dfwcomp. It shoul work, please keep in mind that using a change event or keypress event slows up your system dramatically. If you have similar events in your textbox as well, you'd better stick with a lostfocus statement. -- Arno Zwaag, e-office b.v. <http://www.e-office.com>, the Netherlands Mail: Arno.Zwaag at e-office.com Andy Duckworth <dux@globalnet.co.uk> wrote in article <01bce79d$c3d18060$87577ec2@duckfather>... > Urgent help please! > > I have a user form in an Access 97 document that has a combo box looking up > info from a table. Connected to this I have various textboxes showing > related info from the database. When I change the value in the combo, the > values in the text boxes change as expected. What I want is to be able to > type something into the combo box and have the values in the text boxes > change dynamically. Can any body help in this. I will be needing to do this > in a VB5 app in the near future as well as in Access. > > Thanks in anticipation. > > email at either duckfather@dux.globalnet.co.uk or > andy_duckworth@allied-colloids.co.uk > > Cheers > > Andy >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads