473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

listbox in endless form

hello
I'm from germany

- 1 form bounded at 1 tableI with IDaqi and IDarbG, ok, it' works.
- the form is kind endless, not surprising
- in the detail-section I want to built 1 listbox
its rowsource type query with select * from query23
where IDaqi=aqiID
(the main-key from query23 its tableII and tableIII)

surprising
zero results

when I cut the WhereCondition, all! recordsets show all! value

but
not surprising

any hint for constructing?!
It would be very nice for some example_access_databases?!

Thanks a lot!
Dear all Kurt Lukas, Germany, Saarbrücken like a river and a bridge

Nov 13 '05 #1
1 1579
Herr Lukas wrote:
hello
I'm from germany

- 1 form bounded at 1 tableI with IDaqi and IDarbG, ok, it' works.
- the form is kind endless, not surprising
- in the detail-section I want to built 1 listbox
its rowsource type query with select * from query23
where IDaqi=aqiID
(the main-key from query23 its tableII and tableIII)

surprising
zero results

when I cut the WhereCondition, all! recordsets show all! value

but
not surprising

any hint for constructing?!
It would be very nice for some example_access_databases?!

Thanks a lot!
Dear all Kurt Lukas, Germany, Saarbrücken like a river and a bridge


select * from query23 where IDaqi=aqiID

Is aqiID the current ID on the form? If so, you need to tell the query
where to get the value of aqiID. Let's say the form is called Main.
Then the query should work with
select * from query23 where IDaqi=Forms!Main!aqiID

If you were to create a dynamic SQL statement, you might enter
Dim strSQL as String
Dim rst As Recordset
strSQL = "select * from query23 where IDaqi = " & Me.aqiID
set rst = Currentdb.Openrecordset(strSQL,dbopendynaset)

Next, when you go to a new record, you may need to requery the listbox.
Let's say the Listbox name is ListBox0. In the OnCurrent event for
the form (since it is bound), enter
Me.Listbox0.Requery

I am not sure why anyone would want a listbox filtered to one record.
Just an observation.

Another, why use Query23? That is about as informative as nothing. I
recommend that you click on Query23 and then rightclick and rename it to
something relevent. Then right click on it, select Properties, and
enter something like
Called in form Main. Used in Listbox.
as you now have a reference to it and the name is informative. Then
rebuild the rowsource for the listbox using the queries new name instead
of Query23.
Nov 13 '05 #2

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

Similar topics

4
by: f_salazar | last post by:
English Version !! Hi !! I have a page with a Form, inside the form I have listbox with 'X' elements. Wend I submit the page, an ASP process inside the page have to read those elements and...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
6
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset...
18
by: Dave Sauny | last post by:
Ok, its a friday, I'm at work and I cant get this to work: I have 3 listboxes on one tab control page. when i select an item in listbox1 i want whatever is selected on the other 2 listboxes...
1
by: Microskills | last post by:
I am a new VB.NET programmer. I am writing a dictionary program with a Dictionary file has over 60000 entries. When user starts typing a word in the searchbox, I want to show words that start with...
10
by: ken | last post by:
Hi, Say I have a list box. I also created a control on a form bound to that list box. When I click different rows in the listbox the control changes the ID of the row depending on what I click. ...
5
by: Terry | last post by:
I would like to fill a listbox with a 2 column valuelist and hide the value in the first column as available in VBA. I have tried .items.add and item.addrange but cannot seem to get the desired...
1
by: Steve Richter | last post by:
I have a form. In the Form is a MenuStrip and a FlowLayoutPanel. In the FlowLayoutPanel is a ListBox. The FlowLayoutPanel is set to DockStyle.Fill. The ListBox is set to AnchorStyles.Left |...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...

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.