First up I am a VB rookie.
I am writing a VB module which edits a group of records in a table based on some information entered on a form. I need to write a module as the manipulation/editing of the records is slightly complex.
My (simple) question is -
I need to select a group of records (within the module) from a table, based on Date criteria. I think the best way to do this is to create a new recordset within my module. Then I should be able to check values within the records and edit the records within this recordset easily.
My question is mainly to do with syntax -
What is the VB code for creating a recordset, which relies on criteria (eg a date) for selecting its records?
I think I should be able to use the OpenRecordset method and use an SQL statement to select particular fields and use criteria, but I am not entirely sure how to do this.
I would be selecting the records for the recordset from a table in the open database.
Help appreciated!
I am writing a VB module which edits a group of records in a table based on some information entered on a form. I need to write a module as the manipulation/editing of the records is slightly complex.
My (simple) question is -
I need to select a group of records (within the module) from a table, based on Date criteria. I think the best way to do this is to create a new recordset within my module. Then I should be able to check values within the records and edit the records within this recordset easily.
My question is mainly to do with syntax -
What is the VB code for creating a recordset, which relies on criteria (eg a date) for selecting its records?
I think I should be able to use the OpenRecordset method and use an SQL statement to select particular fields and use criteria, but I am not entirely sure how to do this.
I would be selecting the records for the recordset from a table in the open database.
Help appreciated!