Re: Append Query Problem - Posting record only once

Did you enter the following as ONE LINE. The newsgroup reader may have
wrapped it to TWO Lines.

If DCOUNT("SomeField", "BankingBalanceRecord", "DateField = #" & date() &
"#") = 0 then

currentdb.execute qry_BankingRecordBalance

Also there was a small error in the code, EndIf should be End If

Or try it this way with a line continuation so wrapping should not be a

If DCOUNT("SomeField", "BankingBalanceRecord", _
"DateField = #" & date() & "#") = 0 then

Currentdb.Execute qry_BankingRecordBalance
End If

That does not go in the query, but should be in a sub or function. Probably
the sub for the Open Event of a form.

Another method might be to modify your query, but to suggest an alternative
for that would require that you post the SQL of the query.
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County

<wesley.allen@xxxxxxxxx> wrote in message
I tried your suggestion. I attempted to add it into the query, in a
private sub function, and a module. Nothing seems to work. When I
enter the text, it turns red and says there is a compile error. I am
not very experienced with SQL, so I may be missing some code or not
entering it in the correct place.