rowsource for combo box

D

dimwit

cn.ConnectionString = "Provider=MSDAORA.1;Password=cs;User ID=cs;Data
Source=C;Persist Security Info=True;DBQ=c;UID=CS"
cn.Open
Set rs = cn.Execute("SELECT /*+ ORDERED */ data0050.customer_part_desc "
& _
"FROM data0056 " & _
", data0034 " & _
", data0006 " & _
", data0050 " & _
"WHERE (data0050.rkey = data0006.cust_part_ptr) " & _
"AND (data0006.rkey = data0056.wo_ptr) " & _
"AND (data0056.d_g_w_ptr = data0034.rkey) " & _
"AND (data0034.wiprep_cat = 4) " & _
"AND data0056.tdate " & _
"BETWEEN to_date('" & [Forms]![frm1]![txtDate1] & "',
'mm/dd/yyyy')" & _
"AND to_date('" & [Forms]![frm1]![txtDate2] & "',
'mm/dd/yyyy')" & _
"GROUP BY data0050.customer_part_desc")
cmbJobName.RowSource = ?

i need to know how to get my row source for my jobname. i want rs to be my
row source how will i do it. thanks..
 
C

Chris Nebinger

Okay, without having what you are doing spelled out, I
have to guess. You are executing a stored procedure to
get a recordset. In that case, you need to use a callback
function to fill the combo box. The best place that I've
seen to do that is in the Access Developer's Handbook. I
don't have my copy handy, and I don't use the callback
functions alot, it will solve your problem.


Chris Nebinger

-----Original Message-----
cn.ConnectionString
= "Provider=MSDAORA.1;Password=cs;User ID=cs;Data
Source=C;Persist Security Info=True;DBQ=c;UID=CS"
cn.Open
Set rs = cn.Execute("SELECT /*+ ORDERED */ data0050.customer_part_desc "
& _
"FROM data0056 " & _
", data0034 " & _
", data0006 " & _
", data0050 " & _
"WHERE (data0050.rkey = data0006.cust_part_ptr) " & _
"AND (data0006.rkey = data0056.wo_ptr) " & _
"AND (data0056.d_g_w_ptr = data0034.rkey) " & _
"AND (data0034.wiprep_cat = 4) " & _
"AND data0056.tdate " & _
"BETWEEN to_date('" & [Forms]! [frm1]![txtDate1] & "',
'mm/dd/yyyy')" & _
"AND to_date('" & [Forms]![frm1]! [txtDate2] & "',
'mm/dd/yyyy')" & _
"GROUP BY data0050.customer_part_desc")
cmbJobName.RowSource = ?

i need to know how to get my row source for my jobname. i want rs to be my
row source how will i do it. thanks..
.
 
J

Jonathan Parminter

Hi,

it maybe as simple as setting up an access project (rather
than a standard access mdb). Instead of creating a
recordset as given, create a query that is then the row
source for the combobox.

Alternatively, instead of creating a recordset, assign the
select statement directly to the combobox row source.

Luck
Jonathan
ps sorry I didn't answer in time for your 6 hour
deadline... but here in NZ I was using my off hours for
sleep.
-----Original Message-----
Okay, without having what you are doing spelled out, I
have to guess. You are executing a stored procedure to
get a recordset. In that case, you need to use a callback
function to fill the combo box. The best place that I've
seen to do that is in the Access Developer's Handbook. I
don't have my copy handy, and I don't use the callback
functions alot, it will solve your problem.


Chris Nebinger

-----Original Message-----
cn.ConnectionString
= "Provider=MSDAORA.1;Password=cs;User ID=cs;Data
Source=C;Persist Security Info=True;DBQ=c;UID=CS"
cn.Open
Set rs = cn.Execute("SELECT /*+ ORDERED */ data0050.customer_part_desc "
& _
"FROM data0056 " & _
", data0034 " & _
", data0006 " & _
", data0050 " & _
"WHERE (data0050.rkey = data0006.cust_part_ptr) " & _
"AND (data0006.rkey = data0056.wo_ptr) " & _
"AND (data0056.d_g_w_ptr = data0034.rkey) " & _
"AND (data0034.wiprep_cat = 4) "
&
_
"AND data0056.tdate " & _
"BETWEEN to_date('" & [Forms]! [frm1]![txtDate1] & "',
'mm/dd/yyyy')" & _
"AND to_date('" & [Forms]![frm1]! [txtDate2] & "',
'mm/dd/yyyy')" & _
"GROUP BY data0050.customer_part_desc")
cmbJobName.RowSource = ?

i need to know how to get my row source for my jobname.
i
want rs to be my
row source how will i do it. thanks..
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top