Re: Duplicate current record & Increment a non Primary ID column to CurrMax+1 value
Private Sub Command106_Click()
On Error GoTo Err_Command106_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdRecordsGoToNew
DoCmd.RunCommand...
Re: Duplicate current record & Increment a non Primary ID column to CurrMax+1 value
Sorry I forgot to mention. The ID field is not the primary key and can contain same values. I need to get the Current maximum value in the database + 1.
Thanks for replying :)
Hi
I would like to know if we have a simple method to duplicate the current record in a form and Increment a ID value to Current Maximum Value + 1 , and to clear few boxes so that user can enter new data in this form.
I used Duplicate button but it copies entire data and I am unable to get a...
Hi
I have kept a duplicate button to duplicate the current record but I would like to know how we can make
1) few fields empty and
2) Increment a particular NID field to the next highest number present in the database. ( This particular ID field contains duplicate values too, so Autonumber is...
Hi I am trying to execute a sql to fetch a value which will be source to a text box. Could you help me on how to write and execute sql's in vba?? tnx in advance.
I tried below but it is giving 3163: the field is too small to accept the value..........
Dim SS As String
DoCmd.SS = "SELECT...