Hi John
No luck with Identify, returns. "Syntax error in ALTER TABLE statement"
Regards
James
On Wed, Dec 30, 2015 at 5:14 PM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
James-
Hmmm. That used to work back in about 2003. Try Identity instead of Counter.John Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)
On Dec 30, 2015, at 4:01 PM, James Asante asanteza@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:Getting "Invalid field data type"Regards,JamesOn Wed, Dec 30, 2015 at 4:50 PM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:James-
That's a query, not VBA code. You could do it like this:CurrentDb.Execute "ALTER TABLE MyTable ALTER COLUMN ID Counter(1, 1);", dbFailOnErrorSubstitute your table name for "MyTable".John Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)
On Dec 30, 2015, at 3:35 PM, James Asante asanteza@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:Hi John,Getting "Compile error: Expected: end of statement"Regards,JamesOn Wed, Dec 30, 2015 at 3:02 PM, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:James-
Run a query like this:ALTER TABLE MyTable ALTER COLUMN ID Counter(1, 1);John Viescas, AuthorMicrosoft Access 2010 Inside OutMicrosoft Access 2007 Inside OutMicrosoft Access 2003 Inside OutBuilding Microsoft Access ApplicationsSQL Queries for Mere Mortals(Paris, France)
On Dec 30, 2015, at 12:56 PM, James Asante asanteza@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:HiI have a table that is deleted and appended from time to time. The primary key has the following properties:Field Name = IDData Type = AutoNumberField Size = Long IntegerNew Values = IncrementIndexed = Yes (No Duplicates)Text Align = GeneralIs there a way to get the ID to start at 1 when the table is cleared (deleted) and appended every time?ThanksJames
__._,_.___
Posted by: James Asante <asanteza@gmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (8) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar