Form that creates a new record in a different table

Gambit17

New member
Local time
Today, 07:54
Joined
Jul 24, 2013
Messages
9
Hi at the moment I have a form that uses a text box to search for a specific record in a table.(Cotton12) This works perfectly. What I would like to implement however is if the user so wishes he can edit the data he is shown, whithout editing the actual data in cotton12 and then with this new info create a new record in cotton13.

I hope I have explained myself correctly.

Thank you so much

Gambit17
 
How about something like this?

Using the On Enter event; assign the text box value to a Variable e.g. strEnter

On the After UpDate event; assign the textbox value to a Variable strUpdate.

Then using a simple IF statement, compare the value of the strEnter and strUpdate.

If they are the same then do the normal action.

However, if they are different, then return the texbox value to strEnter and Create a New Record with the textbox value = strUpdate.

Thats the logic; there will be other ways too but as ever, just challenge yourself to think through in code what you do instantly in your brain.
 

Users who are viewing this thread

Back
Top Bottom