MartyConnelly
martyconnelly at shaw.ca
Wed May 10 11:38:53 CDT 2006
could it be just a line wrap problem, if so try this
strsql = "ALTER TABLE [Orders] ALTER Column [OrdOrderID]
Counter" & _
"(" & lngordnomax & ",1)"
Robin wrote:
>Using Access 97 - found this example but keep getting syntax error ...
>
>Don't want to use ADOX because of references ....
>
>Sub testit()
>Dim lngordnomax As Long, strsql As String
>lngordnomax = DMax("OrdOrderID", "PostedOrders", "OrdOrderID>0")
> lngordnomax = lngordnomax + 1
> strsql = "ALTER TABLE [Orders] ALTER Column [OrdOrderID] Counter
>(" & lngordnomax & ",1)"
> CurrentDb.Execute strsql
>End Sub
>
>Can anyone advise what the problem may be
>
>Rgds
>Robin Lawrence
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada