Hi John, Thanks for getting back. Here is the SQL for the query:
SELECT [Incident Query].ID, [Incident Query].name, [Incident Query].DOI, IncidentType.IncidentDesc FROM [Incident Query] INNER JOIN IncidentType ON [Incident Query].IncidentType = IncidentType.IncidentType WHERE (((Month([doi]))=[form]![incidentsbymonth]![combo9]) AND ((Year ([doi]))=[form]![incidentsbymont]![combo11])); What the ultimate goal is, Have a form, user chooses month(combo9), then chooses year(combo11) on exit of combo11, I make the listbox visible with the data above based on user choice, where the user then chooses a client in the listbox to open another detailed data form based on the chosen client. I hope this makes sense.. Thanks for the help. PS: I know bad naming conventions.. of course I'm going back to change them :) Thanks Joe --- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote: > > Joe- > > You can't assign a string value to RowSourceType - it's actually an integer. > But you shouldn't need to set that property in code anyway. What's the SQL > of the empbymonth query? Open the query in Design view, choose SQL View > from the View menu, and paste the text in a reply. > > John Viescas, author > "Building Microsoft Access Applications" > "Microsoft Office Access 2003 Inside Out" > "Running Microsoft Access 2000" > "SQL Queries for Mere Mortals" > http://www.viescas.com/ > > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of eliotchs > Sent: Thursday, December 01, 2005 2:47 PM > To: [email protected] > Subject: [ms_access] Re: Listbox based on a combobox choice > > Hi Mitch, > I tried the following: > Forms!viewincidentsbymonth!Imy.RowSourceType = "Table/Query" > Forms!viewincidentsbymonth!Imy.RowSource = "empbymonth" > > 'where Imy=Listboxname > It still asks for parameter field data. > I know, I'm not getting something.... > > PS. I'm not that good with VB. > > Thanks > Joe > > > > > --- In [email protected], "J. Mitchell Grossack" > <[EMAIL PROTECTED]> wrote: > > > > Set the listbox rowsource after the user chooses the month and year. > > If the rowsource is set on form open that is when it is looking for > > the parameters, not when you set the visible property. > > > > Hope this helps, > > Mitch > > > > --- In [email protected], "eliotchs" <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > I'm trying to base a listbox on two combobox choices. > > > Example: > > > form has two comboboxes month and year. > > > and a listbox, set to visible.false on open > > > Once month & year is chosen,(OnExit) > > > I make the listbox visble, but I still get > > > the parameter boxes asking for the Month and the year. > > > > > > Unlimate goal is: User chooses a month, then chooses a year, > > > the listbox then becomes visible on the same form with the > clients > > > based on chosen month and year. > > > > > > > > > Is there a way around this? > > > > > > > > > Thanks In Advance > > > Joe > > > > > > > > > > > > > > > Yahoo! Groups Links > ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/q7folB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
