with a DAO recordset easiet way to see if recordset is empty is do a
.movelast
.movefirst
then do a if .recordcount = 0 then BANG!
Access doesnt seem to know how many records in a recordset until its gone to the end. Ive used this plenty of times and it doesnt seem to be too memory intensive...
Hi i have a txtbox on a report which i fill with various data by VBA Code what i would like to do is to set parts of that txt within the txtbox as bold. Saves me trying to mess around with lots of txtboxes on the report
Is this possible if so how :confused:
I always use this to do my searching..
Replace(string,"'","''")
Replace one ' with two ''
Then the SQL statement sees that as an apostraphe and enables u to search correctly
Write ur query something like this....
dim strValue as string
strValue = NewReportRTF.value
docmd.runSQL = "INSERT INTO tablename (fieldname) VALUES ('"& strValue &"')"
might be worth sticking a break point on the sql string to ensure correct data and string is made
just make the default value on that column equal to either date() or Now()
when new records are inserted by default unless changed it will populate the field with todays date/time