The code for creating a new record when using the build in record function

Thinh

Registered User.
Local time
Today, 12:33
Joined
Dec 20, 2006
Messages
114
I am creating a dummy forms that is tied to table but i dont have any field bound to the table yet. This forms act as a tempory table if dont like the changes nothing get save to the table. I am really interested in the code that when a user clicks the new record on the build in recordbar on the bottum of the page. Once all the required field is filled in i run the programmatic code to create a new record and then change all the controlsource of the input boxes the right field in the table in that way i wont have to use a recordset. Is is good approach to what i want to archive. if you have any better suggestion feel free to help me out.
 
Save yourself some headaches and coding.

Bind the form to a table and on the BeforeUpdate event of the form ask the user if they want to save the record. If they say no, use Me.Undo to undo the changes.
 
Need direction

I have a forms that list all the records in a table. when i click on an item on the list it gives me a detail section of that records. i have two buttons on the side that is details and create new record. Details does the same thing as double clicking. When user clicks on the create proposal i dont want the user to create a record but display a form that user can play around with before actually committing to the changes. the reason for this is i have an autonumber that is programmatically generated and i dont know if an undo will actually reverse that aswell. I dont want to create a record and undo it because then the autonumber will not match up. The autonumber sits in a table on the server that is check and increamented everytime a new records gets edited. I dont want that number to be generate until some really want to create it. I need some direction and path to what i should do.

Thanks in advance for the advices
 
You could bind your form to temporary table and append the data to your main table on a button and let the autonumber be set at that point.
 

Users who are viewing this thread

Back
Top Bottom