bdsii
02-10-2011, 07:26 PM
I have looked around but cannot find a solution to my problem here. I can figure out a work around but would prefer to learn how to handle this correctly.
I want to add a new record through a form and when the user has completed all the fields they can click on the Add command button. When this happens I would like to add data to two fields not included on the form. I want to add the current date and also a status of "Ready" to another field. This would happen without user interaction but when the record is being added.
I have tried an update tablename and set field value but could not get the syntax correctly or something because I kept getting an error.
Can anyone provide code that would accomplish the above ? For this example let's say the table is TableName and the date field is AddDate and the status field is Status. Anyone have any ideas ?
I also want to add code to the command button that saves the record and then closes. I have that code that works but should I update the two fields before saving the record or use the save record command first and then update the two fields ?
Any help would be appreciated ! :-)
I want to add a new record through a form and when the user has completed all the fields they can click on the Add command button. When this happens I would like to add data to two fields not included on the form. I want to add the current date and also a status of "Ready" to another field. This would happen without user interaction but when the record is being added.
I have tried an update tablename and set field value but could not get the syntax correctly or something because I kept getting an error.
Can anyone provide code that would accomplish the above ? For this example let's say the table is TableName and the date field is AddDate and the status field is Status. Anyone have any ideas ?
I also want to add code to the command button that saves the record and then closes. I have that code that works but should I update the two fields before saving the record or use the save record command first and then update the two fields ?
Any help would be appreciated ! :-)