Jump to content
Server Maintenance This Week. ×

Status(CurrentRecordID)


This topic is 8551 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have an application that is coming along slowly but surely. I've entered alot of dummy test data that I'm now ready to remove. My record ID fields use the function Status(CurrentRecordID). Is there anyway to reset this back to zero so that it starts from the beginning with real data? This is not a big problem, but it would be nice to start from RecordID #1 and I'm at a point where I can probably do whatever is necessary to accomplish the reset.

Thanks, Keith Silva

Link to comment
Share on other sites

Personally, I wouldn't use the Status( CurrentRecordID ) function as the unique key field of your records. I would use an auto-enter field.

However, if you're really interested, I think that saving the file as a clone will do the trick.

Chuck

Link to comment
Share on other sites

Chuck:

Thanks for the response. Your instructions work perfectly. I'm going to do a little more development and testing now that I know how easy it is to clean thins up. For the record, my key fields are auto-enter fields. For my project file, I use a ProjectID field that auto-enters the following: Status(CurrentDate)&"-"&Status(CurrentTime)&"-"&Status(CurrentRecordID)&"-project"

I have the file name at the end because I thought this would help me make sure my relations are working correctly. Thanks again for the help.

Regards, Keith Silva

Link to comment
Share on other sites

I apologize, I should have been more specific. When I said "auto-enter" I should have said "auto-enter serial number".

And just FYI, I'll go on the record here to specify my own method for using IDs. For each file in my solution I choose a three letter code, such as "INV" for the invoice file, "COM" for the company file, etc. Every file gets a text field called something like Invoice_ID or Company_ID which is set to auto enter a serial number that has the three letter code in it followed by a number, usually 1 to begin. So the first record I create in the invoice file has an ID of "INV1" and the first record in the company file has an ID of "COM1".

I personally add the three letter code so that if I ever see an ID field anywhere with information in it, I know immediately where the data is from. I (almost) never show the ID fields to the user, since they are an entirely internal programming tool, and would have no meaning to the user. If the user needs something like an invoice number field, I use a different field, although at times I have made to two related (such as making my Invoice_Number field a text calculation field set to NumToText( TextToNum( Invoice_ID ) ), which strips out the three letter code I use).

The solution you have will have a unique ID for every record in the database, and it will work, however.

Chuck

Link to comment
Share on other sites

This topic is 8551 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.