Microsoft Access Sydney Australia

Wednesday, December 10, 2008

Sql Server compatible Syntax...what it means for access

Had a small hicup with an access database which had a nice little filtering system which just stopped working when moving to a more secure workfile.

Found that setting the filter to be [Surname] Like 'A*' was the issue.
It kept changing to using Alike 'A*' in the advanced criteria.

All we had to do was use % instead of * and all was well.

This will work better when we do move the backend to sql server!

Tom Bizannes
Sydney, Australia

Labels:

Monday, August 18, 2008

VBA opening comments in Excel

'This was a pain in the neck but if there was a better way than trapping the error when no comment, it would be good to know!

Sub test()
Call AppendComment(ActiveSheet.Cells(4, 1), "Let's try again")
End Sub

Public Sub AppendComment(r As Range, sCommentToAdd As String)
Dim sComment As String

On Error GoTo Err_AppendComment

sComment = r.Comment.Text
If sComment = "" Then
r.AddComment (sCommentToAdd)
Else
r.Comment.Delete
r.AddComment sComment & vbNewLine & sCommentToAdd
End If
Exit Sub
Err_AppendComment:
If Err.Number = 91 Then
sComment = ""
Resume Next
Else
MsgBox "Error Appending comment to " & r.Parent.Name & vbNewLine & Err.Description & vbNewLine & "Error Number:" & Err.Number, vbCritical
End If
End Sub

Tuesday, July 22, 2008

City to Surf 2008 is coming

Have lost count of how many I have entered.

Luckily the sun-herald emailed me past times.

Here goes:

Year:2007 Time:98:12 Place:19,164

Thursday, May 01, 2008

HTML Codes for Copyright and Trademark

You need to put these in to get the TM sign or Copyright symbol.

"™" = ™ Trade Mark Sign
"©" = © Copyright Symbol

The first one is a doozy as it used to be "™

Tom Bizannes
http://www.macroview.com.au

Sunday, March 30, 2008

Nokia 6110 Navigator

Finally got a new mobile phone this week.

The Nokia 6110 with the GPS unit etc.

We'll what fun and games I had trying to load some podcasts!
More on that later.

The GPS is fine, but it does chew up battery time.
We were heading over the harbour from Circular Quay to Manly at 24km/h according to the phone.
This needs alot more testing before I can say whether it is useful or just a gadget!

Regards,
Tom Bizannes
Sydney, Australia

Labels:

Saturday, December 08, 2007

VBA Get the last day of next month

This is courtesy of Peter Vincent:

He wrote this for an invoicing application he was working on...

Get the last day of next month (VBA)

Get the 1st of 2 months from now and take one day away.

Format(DateAdd("d", -1, Format(DateAdd("m", 2, now()), "1, mmmm, yyyy")), "d, mmmm, yyyy")

Links for games

Thursday, November 22, 2007

Microsoft Access VBA Delete Error Tables

Public Function iDeleteErrorTables() As Integer
'Returns the number of error tables deleted
Dim obj As AccessObject
Dim dbs As Object
Dim iCount As Integer

Set dbs = Application.CurrentData
iCount = 0
' Check each object of the AllTables collection
For Each obj In dbs.AllTables
If Right(obj.NAME, 6) = "Errors" Or Right(obj.NAME, 7) = "Errors1" Then
DoCmd.DeleteObject acTable, obj.NAME
iCount = iCount + 1
End If
Next obj

DeleteErrorTables = iCount

End Function