I think the problem is the continuous form, not SQL Server. Access doesn't
support different rowsources for the combo boxes in different rows of a
continous form. I have mitigated this a bit by using an inclusive rowsource
that contains the data applicable to all rows. This works great for
displaying the data. When a user starts to edit a row, or drop-down the
combo box, you can change the rowsource to just show the applicable data
they should be able to select. When they save the row, restore the inclusive
rowsource so all the rows show data. It's a pain, and difficult to make it
100% robust, but can be made to work well enough.
"bcap" <(E-Mail Removed)> wrote in message
news:4940bcc0$0$2518$(E-Mail Removed)...
> Unfortunately, as I said, I already tried prefixing the SP name with the
> schema name.
>
> As I also said, using code to assign a rowsource to a combo box doesn't
> work when the combo is on a continuous form, and the visible column is not
> the bound column. What happens is that the current record shows the
> correct value in the combo box, and all other records show blank. In this
> circumstance the row source needs to be parameterised.
>
> "Tore" <(E-Mail Removed)> wrote in message
> news:54697576-5D1C-4911-9D6D-(E-Mail Removed)...
>> This is how I set rowsource for a couple of comboboxes using a stored
>> procedure (MSP_.....) with parameters. It is quite dirty code as i refer
>> to
>> comboboxes on some other form (Menu), but it works. I have turned more to
>> using ADO which I find more robust, although it requires a bit more of
>> coding.
>>
>>
>> Me.cboAccount1No.RowSource = "exec MSP_SELECTACCOUNTNUMBERS " &
>> Forms!Menu!cboCompany & ", " & Forms!Menu!cboFiscalYear
>>
>> Me.cboAccount1Name.RowSource = "exec MSP_SelectAccountNames " &
>> Forms!Menu!cboCompany & ", " & Forms!Menu!cboFiscalYear
>>
>> Tore
|