473,516 Members | 3,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update txtbox with value from listbox

Hi,

I have three objects in my form:

a listbox (lstform)
a subform (fsub)
a txtbox (txt)

The listbox lists form names that will be displayed in the subform. To do
this I use the following line in the afterupdate event of the listbox:

Me.fsub.SourceObject = Me.lstform.Column(1)

This works ok.

Now, I have another column (hidden in the listbox) that I want to display
in the txtbox (txt). It is just some text explaning what form is displayed
in the subform.

Question is, how to do this.

I've tried to set in the Control Source of txt the following:

=Me.lstform.column(1)

It's not working, what should I do?

Thanks,

Koen
Nov 12 '05 #1
1 1656
You're almost there. Remember that columns are zero-based, so
the first column in the query is Me.lstForm(0) and the last one is
Me.lstForm(n-1)

Now, for this to work, you need to set the column count property
for the listbox to the full number of columns desired. Make sure
this property is set correctly.

--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast
"Koen" <no@spam.nl> wrote ...
Hi,

I have three objects in my form:

a listbox (lstform)
a subform (fsub)
a txtbox (txt)

The listbox lists form names that will be displayed in the subform. To do
this I use the following line in the afterupdate event of the listbox:

Me.fsub.SourceObject = Me.lstform.Column(1)

This works ok.

Now, I have another column (hidden in the listbox) that I want to display
in the txtbox (txt). It is just some text explaning what form is displayed
in the subform.

Question is, how to do this.

I've tried to set in the Control Source of txt the following:

=Me.lstform.column(1)

It's not working, what should I do?

Thanks,

Koen

Nov 12 '05 #2

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

Similar topics

7
4063
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
4
26150
by: N. Graves | last post by:
Hello... thank you for your time. I have a form that has a List box of equipotent records and a sub form that will show the data of the equipment select from the list box. Is it possible to make a change in the name field in the details, then refresh the list box with new name? Please help and thanks!
3
3425
by: Colleyville Alan | last post by:
I have a incremental search box that has been working fine for a couple of months but is now acting up. This search box is from the cd that comes with Getz's book, so I did not write it and have only a superficial understanding of how it works. I have had some trouble in the past when my code goes to another form and comes back sometimes...
3
1512
by: Magno101 | last post by:
Hi all, First let me start out with what I want to happen with this and then maybe y'all can give me some better insight. I have a database in Microsoft Access which we need to upsize to SQL. We currently have a problem with it now. On one of our forms (frmScan, which is an unbound form with two unbound controls) there is a txtBox contorl...
1
2295
by: Burghew | last post by:
Hi all, I have 3 unbound combo boxes in my form which basically helps me to filter for values. I need to update a text box which will be stored with the value I receive after filtering with the combo boxes. I know of the column(n) method (derived from the third combo). However if the user does any sort of manipulation in the first or second...
2
5656
by: Manish | last post by:
Hey folks I am having a weird problem in ASP .Net. My page is in C#. I have a datagrid, which populates based on selection in drop down box on ASP page. This datagrid has template textbox colum in itemtemplate. Datagrid is something like this- Category Week Amt Week% Button Revenue 1 100 Update Revenue 2 200 ...
5
3841
by: Marc Gravell | last post by:
In the following example, the Bindings don't update the UI if the property change is triggered from the non-UI thread - see the async button - from the listbox contents (and observation) the change to the object has occurred correctly; have I got a foobar somewhere, or is this the expected behaviour? I can "fix" it by adding an additional few...
0
1055
by: shotta | last post by:
I have two list boxes where a user can make a selection click a add button within a wizard control and it add it to another listbox in the same wizard. My problem is the add goes fine the second listbox is updatedwith the new value. The problem is the listbox where the selection was made still contains the value that was just put in th first...
7
2393
by: BONES7714 | last post by:
Hello, This is my first post to any sort of forum although I've used them to learn the very little Access/VBA that I know so please forgive my ignorance. I work for the National Guard as Combat Medic and I've been tasked with created a DB to track the location of other soldiers medical records and other various infomation. As such, I have...
0
7273
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...
0
7405
Oralloy
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. ...
1
7136
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...
0
7547
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...
1
5106
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...
0
4769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3252
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1620
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
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.