format sql statement

I have a listbox which has the fields amendment and original. The
field values are true or false. I use these fields to merge into word
depending on their values.

I've created a query to give me the values, but I need to go through
the recordset to merge them into Word.

I'm having trouble with the select statement format. It highlights the
last paragraph. Help? Thanks

strSQL1 = "SELECT AccountUse.[Customer ID], AccountUse.[Holder ID],
AccountUse.AccountNumber, " & _
"AccountUse.AccountUseID, AccountUse.[Category ID],
AcctCategory.[Category Name], " & _
"AccountUse.Active, AccountUse.Original, AccountUse.Amendment "
& _
"FROM AcctCategory INNER JOIN AccountUse ON
AcctCategory.[Category ID] = AccountUse.[Category ID] " & _
"WHERE AccountUse.[Customer ID]= " &
[Forms]![Main]![txtselcust] & " AND " & _
"AccountUse.[Holder ID] = " & [Forms]![Main]![txtAcctHolderID]
& " AND " & _
"AcctCategory.[Category Name]= 'POS' & " AND " & _
"AccountUse.Active= 'True' & '"


Relevant Pages

  • Re: event triggered by listbox?
    ... Depending on the user selection from listbox A, ... using scripting and dhtml methods. ...
  • Re: Multi Colum Listbox in UserForm
    ... That's not a multi-column listbox, but a multi, dependent listboxes. ... Best way is to have an initial Business Unit list on a worksheet and bind ... Create the other lists as ... > the main selection of a "Business Unit" which depending on the choice made ...
  • Listbox event for add/remove item?
    ... I want to enable/disable buttons depending on whether items exist in a ... listbox. ... I thought fore sure there would be an event anytime an item was ...
  • list item colour
    ... My fields in the dataview are ... I have set the listbox drawMode to OwnerdrawFixed and want to be able to ... display the name in a different color depending on the idCat. ...