473,545 Members | 1,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo dropdown list box (on Switchboard)-How to open a specific row?

What I'm trying for: If this selection or if click on selection
(highlighted line choice/
which ever selection change) w/in query's combo dropdown list box (on
Switchboard),
then Open in Datasheet View, the specific underlying record's Row...
showing all columns Or selected columns.

For a specific row's record ONLY, Or for all Xs (same type), or for the
whole data sheet
(all records... includes all types then), but focus still opens on the
specific selection.

Is there anyone that knows how to do this & explain using correct
syntax, in simplest clear terms? Here's what I have (record source
is query):
Private Sub QueryQ_Click()
If Me.[TableNameABC]![FieldX] Then
Me.[FieldX:Yes] = "x"
End If
If Me.[TableNameABC]![FieldY] Then
Me.[FieldY:Yes] = "y"
End If
If Me.[TableNameABC]![FieldZ] Then
Me.[FieldZ:Yes] = "z"
End If
Hope this is clear. THANKS in advance!!

Aug 1 '06 #1
3 3834

Cagey wrote:
What I'm trying for: If this selection or if click on selection
(highlighted line choice/
which ever selection change) w/in query's combo dropdown list box (on
Switchboard),
then Open in Datasheet View, the specific underlying record's Row...
showing all columns Or selected columns.

For a specific row's record ONLY, Or for all Xs (same type), or for the
whole data sheet
(all records... includes all types then), but focus still opens on the
specific selection.

Is there anyone that knows how to do this & explain using correct
syntax, in simplest clear terms? Here's what I have (record source
is query):
Private Sub QueryQ_Click()
If Me.[TableNameABC]![FieldX] Then
Me.[FieldX:Yes] = "x"
End If
If Me.[TableNameABC]![FieldY] Then
Me.[FieldY:Yes] = "y"
End If
If Me.[TableNameABC]![FieldZ] Then
Me.[FieldZ:Yes] = "z"
End If
Hope this is clear. THANKS in advance!!
I *think* I understand. You want to choose which field to filter by.
If you're filtering a report or form's records, then it's easy.

I think your problem is that you're not filtering by a single field.
IOW, [Field1]={some value], but a group of possible fields. The only
way to do that is to build the Where clause on the fly and then pass
the where clause in the open event of the form/report.

Private Sub cmdOpenEmployee Form_Click()
DoCmd.OpenForm "frmEmploye e", acNormal, , "EmployeeID =" &
Me.Combo2, acFormEdit, acDialog
End Sub

otherwise, you need to build the where clause on the fly.

say you have
an unbound combobox of field names: cboFieldName
an unbound textbox where you can type in a text value: txtValue

Private Sub cmdOpenEmployee Form_Click()
dim strFilter as string
const cQUOTE as string ="'"
strFilter = "[" & Me.cboFieldName & "] = " & cQUOTE & Me.txtValue &
cQUOTE

DoCmd.OpenForm "frmEmploye e", acNormal, , strFilter, acFormEdit,
acDialog
End Sub

or did you mean something else?

Aug 1 '06 #2

pi********@hotm ail.com wrote:
Cagey wrote:
What I'm trying for: If this selection or if click on selection
(highlighted line choice/
which ever selection change) w/in query's combo dropdown list box (on
Switchboard),
then Open in Datasheet View, the specific underlying record's Row...
showing all columns Or selected columns.

For a specific row's record ONLY, Or for all Xs (same type), or for the
whole data sheet
(all records... includes all types then), but focus still opens on the
specific selection.

Is there anyone that knows how to do this & explain using correct
syntax, in simplest clear terms? Here's what I have (record source
is query):
Private Sub QueryQ_Click()
If Me.[TableNameABC]![FieldX] Then
Me.[FieldX:Yes] = "x"
End If
If Me.[TableNameABC]![FieldY] Then
Me.[FieldY:Yes] = "y"
End If
If Me.[TableNameABC]![FieldZ] Then
Me.[FieldZ:Yes] = "z"
End If
Hope this is clear. THANKS in advance!!

I *think* I understand. You want to choose which field to filter by.
If you're filtering a report or form's records, then it's easy.

I think your problem is that you're not filtering by a single field.
IOW, [Field1]={some value], but a group of possible fields. The only
way to do that is to build the Where clause on the fly and then pass
the where clause in the open event of the form/report.

Private Sub cmdOpenEmployee Form_Click()
DoCmd.OpenForm "frmEmploye e", acNormal, , "EmployeeID =" &
Me.Combo2, acFormEdit, acDialog
End Sub

otherwise, you need to build the where clause on the fly.

say you have
an unbound combobox of field names: cboFieldName
an unbound textbox where you can type in a text value: txtValue

Private Sub cmdOpenEmployee Form_Click()
dim strFilter as string
const cQUOTE as string ="'"
strFilter = "[" & Me.cboFieldName & "] = " & cQUOTE & Me.txtValue &
cQUOTE

DoCmd.OpenForm "frmEmploye e", acNormal, , strFilter, acFormEdit,
acDialog
End Sub

or did you mean something else?
Just making sure we're on the same pg... I'd like to be able to enter
directly into a row on a dropdown which pulls from either a query or
directly from a table. This query's dropdown is on the Switchboard (if
that matters). Phoney Ex. -
Row 1 || Name1 || Name2 || Name3
Row 2 || Descrips
Row 3 || Labels today || Labels yesterday 45 || More
Row 4 || Labels today || Labels yesterday 410
Query may narrow database records' view to 3 or 4 columns w/in the
dropdown list like above ex. (|| represents column end here), but maybe
the user wants to click into Row 3, so they can pick/go directly to
line of info. selected, either showing only that line, plus all it's
other columns (additional columns - same line in the database, but not
part of query), or go directly to that line, while allowing user to see
all database columns/rows (records), rather than having to scroll or
search for the line they wanted. It sounds like I may be asking
something diff. than what you answered?? Not sure. Please let me know.
THANKS!!!

Aug 2 '06 #3
Just making sure we're on the same pg... I'd like to be able to enter
directly into a row on a dropdown which pulls from either a query or
directly from a table. This query's dropdown is on the Switchboard (if
that matters). Phoney Ex. -
Row 1 || Name1 || Name2 || Name3
Row 2 || Descrips
Row 3 || Labels today || Labels yesterday 45 || More
Row 4 || Labels today || Labels yesterday 410
Query may narrow database records' view to 3 or 4 columns w/in the
dropdown list like above ex. (|| represents column end here), but maybe
the user wants to click into Row 3, so they can pick/go directly to
line of info. selected, either showing only that line, plus all it's
other columns (additional columns - same line in the database, but not
part of query), or go directly to that line, while allowing user to see
all database columns/rows (records), rather than having to scroll or
search for the line they wanted. It sounds like I may be asking
something diff. than what you answered?? Not sure. Please let me know.
THANKS!!!
Ify ou want to change the controlsource of your combobox on the fly,
you'd have to do it with code. I think that's what you mean, because
there's no other way to change the number of columns returned by a
query. (Well, unless you change the controlsource of the combobox to
some other query object or SQL statement. And then you'd have to
change the number of columns shown in the combobox control. but I'm
completely guessing what you're talking about. how about a REAL
example, because most of what you've said so far, at least from a pure
database standpoint, doesn't make much sense to me. Again, maybe I'm
missing the point, but so far nobody else has answered...

If all you _really_ want is to filter a form in the open event of the
form (as the subject says), so you see only all the records with a
field value in common, then that's a walk. All you have to do is
specify a filter (valid WHERE clause without the "WHERE") in the Open
event of the form.

But the way you are talking about varying numbers of columns in your
combobox, I'm not sure what you're really after. So how about giving a
real example?

Thanks,
Pieter

Aug 3 '06 #4

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

Similar topics

1
8263
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two dropdown lists. If you change the selection of the left one (e.g. choose parentoption2), it should open up page2.htm in a popup window.
1
10009
by: Rod Early | last post by:
I need to know when the select element's dropdown list is opened (as when the user clicks on the arrow or does ALT-downarrow from the keyboard). Similarly, I need to known when the dropdown list closes. The closing of the dropdown list can happen without changing the dropdown, hence the onchange event is not a sure way to determine that...
3
7069
by: Charles | last post by:
I am trying to add the ability for a user to change the order in which the elements are listed in a dropdown list box. Before I added the ListID field the dropdown list box order was controlled using the MotorhomeID. The problem I am having is that I don't know the best method for allowing people to make the ListID changes easily. ...
1
1701
by: Dale Geffs | last post by:
I have a form with a combo box and when it (combo) gets focus I issue a .dropdown. Using A2K and SP1 everything works fine and the list drops down under the control as expected. If I use a PC with SP3 the dropdown actually pops up over the combo box covering it completely. Same exact form and source code in both examples. Anyone ever seen...
4
3511
by: Theo Jansen | last post by:
Hi, i'm making an application in Access and in the query made, i'd like the user to fill in a parameter when opening the query (in a report). It's much easier for the user if the parameter was a dropdown list from which he can select, because the parameters are rather long... Does anyone know how to make that dropdown list? TIA
4
1568
by: Steve Le Monnier | last post by:
I have a textbox with a lookup button facility. What I would like to do is also offer a quick selection facility by having a dropdown list appear under the control once the user has typed a single character. The same kind of functionality that you see on website textboxes these days. I don't want to use a combo, but I do like the fact that the...
2
6049
by: Abdhul Saleem | last post by:
Hi, Any code snippet or help link available on how to auto resize the dropdown list part of the combo(<select>) ? Or, is there any alternative techniques for displaying the full lenth text when dropdown the combo? Regards, M. Abdhul Saleem.
2
1583
by: SF | last post by:
Hi, I am new to ASP.NET. I have started to create a new ASP.NET web. I can succesfully insert a table into a form but my form does not look good becuase some filed (from table) are foreigh key that link to other table to lookup for information and it is displaying only number. I want to change that fields into combo/dropdown field but do...
3
6818
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hello, friends, We use System.Windows.Forms.ComboBox in our c#.net 2005 app. We want to make the dropdown list wider than the comboBox's width. (Some items in the dropdown list have more characters that go beyond the comboBox's width). How do we do it? Thanks a lot.
0
7459
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
7393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7803
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7411
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
5965
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4942
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
3439
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1871
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
0
695
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.