If then in an SQL clause - to filter drop down list

B

babs

Private Sub cbojob_AfterUpdate()
Dim aSQL As String
aSQL = "SELECT Quoteid, job,Clientid,cost,overallmarkup,pit,
markup,taxrate,origin,destination,divisor,grossweight,taxex,cartagerate,fuelperrate"
& " FROM tblquotejoe " & "if quoteaccepted=yes" & "WHERE job= """ & Me.cbojob
& """ " & "ORDER BY QUOTEID"
Me.cbquoteid.RowSource = aSQL
End Sub
The above info was put together to filter a quoteid dropdown list for
quotes that went with the specific job that was selected in the job dropdown
list. I need to include only the quotes that go with the selects
job(multiple quotes for 1 job) and only include the quoets in the drop down
IF a field called quoteaccepted(a yes/no) field is YES. Sure my syntax is
wrong getting erroe in the FROM clause.

It worked fine before I included the IF for the quoteaccepted field.

Thanks,
Barb
 
B

babs

think this is a similar application from before but somewhat different. Any
ideas??



I would like to create a drop down list for ovens, I have a table of all of
the available ovens for the day. Primary key is oven#. I have a table that
assigns oven# to given orders. (call it order details) on this table there
is a checkbox field says OVEN no longer available for use. I would like the
order details form to have a oven drop-down list(presently-pulling it from
the ovens table- shows all ovens wether-not really available) that would
include ALL available(meaning checkbox not checkoff) ovens. And at the end
of the day - I would like ALL of the ovens to be RELEASED and now all ovens
available for drop down at start of new day. This sound odd but it is how or
business works. Feel kind of looping - not sure how to do. Please help if
you can.

Thanks,
Barb
 

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

Top