Hello,
I am very confused (still somewhat a newbie) about how to make a record that displays on a form, the current record of the recordset. When I add/modify a record to a Recordset, I expected that record to become the current record. But, my assumptions were incorrect (i come from a mainframe background).
I am using ADO. When the form/program initially opens, it opens to a blank form. It opens using the code:
The program gives the user the option to add a record, by inputting data in the fields and clicking the add button.
If the user wants to modify or delete a record, the program allows the user to input selection criteria in specific fields on the form, then obtain the record the user wants to modify or delete using the "view" button. My program uses SQL code to obtain the records the user want to modify or delete. I am not using any methods to navigation (i.e. findfirst, movenext, etc) the recordset. I am using SQL.
My questions are:
1. When a record is obtained using SQL code and displayed on the form, is the record obtained, the current record in the recordset?
2. If not, how can I make the record current of the recordset?
3. Also, I want to display the oldvalue of a fields on the form when it has been updated. The oldvalue of the fields currently is NULL. I think this is occurring because the record that is displayed on the form, actually is not current in the recordset. Is this true?
Thanks in advance for your help and giving me some clarity on recordset currency.
smsmail
I am very confused (still somewhat a newbie) about how to make a record that displays on a form, the current record of the recordset. When I add/modify a record to a Recordset, I expected that record to become the current record. But, my assumptions were incorrect (i come from a mainframe background).
I am using ADO. When the form/program initially opens, it opens to a blank form. It opens using the code:
Code:
DoCmd.GoToRecord , , acNewRec
The program gives the user the option to add a record, by inputting data in the fields and clicking the add button.
If the user wants to modify or delete a record, the program allows the user to input selection criteria in specific fields on the form, then obtain the record the user wants to modify or delete using the "view" button. My program uses SQL code to obtain the records the user want to modify or delete. I am not using any methods to navigation (i.e. findfirst, movenext, etc) the recordset. I am using SQL.
My questions are:
1. When a record is obtained using SQL code and displayed on the form, is the record obtained, the current record in the recordset?
2. If not, how can I make the record current of the recordset?
3. Also, I want to display the oldvalue of a fields on the form when it has been updated. The oldvalue of the fields currently is NULL. I think this is occurring because the record that is displayed on the form, actually is not current in the recordset. Is this true?
Thanks in advance for your help and giving me some clarity on recordset currency.
smsmail