I have created a bit of VBA for pupils where the aim is: input line of text from file;parse the input line and extract values; using the AddNew, populate the respetive fields in the table. General outline is:
Expand|Select|Wrap|Line Numbers
- Set cncurrent = CurrentProject.Connection
- Set rsDiag = New ADODB.Recordset
- 'Open the database table
- strsql = "Select * from tblEquipment"
- rsDiag.Open strsql, cncurrent, adOpenDynamic, adLockOptimistic
- .....
- Open FileName For Input As #1
- ....
- Do While Not EOF(1)
- ....
- rsDiag.AddNew
- rsDiag!NumberPlate = NumberPlate
- rsDiag!TypeOfEquipment = TypeOfEquipment
- Loop
- ....
Totally baffled and have some very frusterated pupils, who, in order to achieve came to my Saturday session today!!
Please help. By the way, how will I know when their is a response to this post? Certainly don't want to miss it. If you do reply can you please advice me by email so I know to look ********
Thanks in advance