If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
increment number field
I need to increment a number field in a table that will
work like auto number but I have data that was migrated from Lotus Approach so I can not use auto number. Does anyone have a routine to do this? I also have a problem pre populating a field and get ENTER PARAMETER VALUE the error is (can't find value asked for input) |
#2
|
|||
|
|||
increment number field
On Wed, 28 Apr 2004 13:36:59 -0700, "
wrote: I need to increment a number field in a table that will work like auto number but I have data that was migrated from Lotus Approach so I can not use auto number. Does anyone have a routine to do this? If you do your data entry in a table datasheet... don't; the table has no usable events. Instead use a Form. In its BeforeInsert event put code like Private Sub Form_BeforeInsert(Cancel as Integer) Me!txtID = NZ(DMax("[ID]", "[your-table-name]")) + 1 End Sub I also have a problem pre populating a field and get ENTER PARAMETER VALUE the error is (can't find value asked for input) Please post your code. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
#3
|
|||
|
|||
increment number field
" wrote in
: I need to increment a number field in a table that will work like auto number but I have data that was migrated from Lotus Approach so I can not use auto number. Yes you can. You can append records into a table and preserve any values that go into an autonumber field (allowing, of course for key violations). This works just fine, for example INSERT INTO MyTable (MyAutonumber) VALUES (1022); and you can do the same by inserting a set of records from another SELECT query. The autonumber seed will be set to the next highest number (unless that is lower that whatever it already was, if you see what I mean). Hope that helps Tim F |
Thread Tools | |
Display Modes | |
|
|