A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

combo boxes on form with subform



 
 
Thread Tools Display Modes
  #1  
Old November 23rd, 2004, 06:01 PM
Tcs
external usenet poster
 
Posts: n/a
Default combo boxes on form with subform

I've made my one form into a subform. The subform displays the records I want
to see from only one table, based on selections I make in two combo boxes on the
main form.

When I open my form, all the fields of the subform show "#Name?".

If I put the table name where my data is, Combo box 1 shows all "Apps"
(MetaSchema) available. (This is correct.) I make my selection, then I move to
Combo box 2. Here's my "After _Update" for Combo Box 1 code to get my Combo Box
2 data:

Dim strSQL As String

strSQL = "Select distinct MetaSchema, CatalogVers from tblSubModules"
strSQL = strSQL & " where ((tblSubModules.MetaSchema)=" & Me!cbxMetaSchema &
")"
Me!cbxCatalogVers.RowSourceType = "Table/Query"
Me!cbxCatalogVers.RowSource = strSQL

When I click on the down arrow of combo box 2, I get a small "Enter Parameter
Value" window. (The pulldown list is empty.) It asks for the value of the
"Apps" I selected in Combo box 1. Needless to say, Combo box 2 is EMPTY.
Here's my "After _Update" for Combo Box 2 code to get the records to display on
my subform:

Dim strSQL As String

strSQL = "Select * from tblSubModules"
strSQL = strSQL & " where (((tblSubModules.MetaSchema)=" & Me!cbxMetaSchema &
") and "
strSQL = strSQL & " ((tblSubModules.CatalogVers)=" & Me!cbxCatalogVers & "))"
Me!cbxCatalogVers.RowSourceType = "Table/Query"
Me!cbxCatalogVers.RowSource = strSQL

MsgBox "strSQL...(" & strSQL & ")"

Me.frmSubModulesSub.Form!cbxCatalogVers.Requery

But I don't think it executes this, as I never see this MsgBox, which I put in
for debugging.

If anyone has any ideas/thoughts/suggestions (short of me giving up), I'd
appreciate hearing from you.

Thanks in advance,

Tom


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates in a listbox connected to a form... RusCat Using Forms 13 November 25th, 2004 03:31 AM
Design questions Bruce Database Design 15 June 19th, 2004 12:12 AM
Synchronizing Multiple Combo boxes to view matching data on a Form Mark Senibaldi Using Forms 4 June 16th, 2004 08:48 PM
Recordset in subform based on field in parent form Lyn General Discussion 15 June 14th, 2004 03:10 PM
Combo Box Painted Corner for Dirk, Pavel or any other Guru Dirk Goldgar Using Forms 5 June 1st, 2004 06:56 PM


All times are GMT +1. The time now is 09:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.