Re: HELP PLEASE
From: Marshall Barton (marshbarton_at_wowway.com)
Date: 03/09/04
- Next message: TC: "Re: Collecting POP3 Email in Access VB"
- Previous message: TC: "Re: records"
- In reply to: DBarker: "Re: HELP PLEASE"
- Next in thread: DBarker: "Re: HELP PLEASE"
- Reply: DBarker: "Re: HELP PLEASE"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 08 Mar 2004 21:48:56 -0600
Check the first query in your posted code more carefully.
Are you sure that the CaseID field is a numeric type?
I don't have any idea what you mean about a "parameter". I
can't discern the use of any parameters.
-- Marsh MVP [MS Access] DBarker wrote: >I am confused, your syntax is the same as mine. I don't >think so, it seems that there has to be an additional >parameter added but I am not sure where exactly. > > >Marshall Barton wrote: >>You forgot the brackets around Journal Date in at least >>one place: >> >> strSQL = "SELECT [Journal Date], Journals, " _ >> >>Is all this trouble caused by you're use of space >>characters in names? >> >> >>DBarker wrote: >>>This is the error message: >>>Run-Time Error 3075 >>>Syntax Error (Missing operator) in query >>>expression "Journal Date" >>> >>>I have tried putting journal date in brackets and just >>>with an underscore separating the two words. >>> >>>Below is the entire code >>>------------------------------------- >>> >>>Public Sub Combine() >>> >>> Dim strSQL As String >>> Dim dbs As DAO.Database >>> Dim rstFr As DAO.Recordset >>> Dim rstTo As DAO.Recordset >>> Dim varNoteBatch As Variant >>> >>> Set dbs = CurrentDb() >>> strSQL = "SELECT Journal Date, Journals, " _ >>> & "FROM STi_Table " _ >>> & "ORDER BY CaseID" >>> Set rstTo = dbs.OpenRecordset(strSQL, dbOpenDynaset) >>> strSQL = "SELECT [Journal Date], Journals, " _ >>> & "FROM STi_Multiples " _ >>> & "ORDER BY CaseID" >>> Set rstFr = dbs.OpenRecordset(strSQL, dbOpenSnapshot) >>> Do Until rstTo.EOF >>> varNoteBatch = Null >>> strSQL = "[CaseID]=" & rstTo!CaseID >>> rstFr.FindFirst strSQL >>> Do Until rstFr.NoMatch >>> varNoteBatch = varNoteBatch & "; " _ >>> & rstFr![Journal Date] & " " & rstFr!Journals >>> rstFr.FindNext strSQL >>> Loop >>> rstTo.Edit >>> rstTo!Journals = varNoteBatch >>> rstTo.Update >>> rstTo.MoveNext >>> Loop >>> >>> rstFr.Close >>> rstTo.Close >>> Set rstFr = Nothing >>> Set rstTo = Nothing >>>End Sub
- Next message: TC: "Re: Collecting POP3 Email in Access VB"
- Previous message: TC: "Re: records"
- In reply to: DBarker: "Re: HELP PLEASE"
- Next in thread: DBarker: "Re: HELP PLEASE"
- Reply: DBarker: "Re: HELP PLEASE"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|