I'm a complete newbie when it comes to VBA, would appreciate some help here...
I have a Form bound to table 'Service' and a subform (datasheet) bound to table 'ServiceEngineer', the linked field is 'ServiceID'. The subform allows user to select the names of Engineers (email addresses of the enginners are pulled directly from Employee's table). If there are two engineers selected, I want to have a button to allow the user to click on it and it sends an email to the two selected engineers. How should I go about doing it?
I think I need something like:
Dim db As Database
Dim rsRecord As Recordset
Set db = CurrentDb()
Set rsRecord = db.OpenRecordset("ServiceEngineer",dbOpenDynaset)
That's as far as I know, I need help on the kind of search/find available for stepping through the right records in a query (containing 'ServiceEngineer' and 'Employee' table for the email addresses) so that I can send out the email.
Apprecaite any help rendered.
I have a Form bound to table 'Service' and a subform (datasheet) bound to table 'ServiceEngineer', the linked field is 'ServiceID'. The subform allows user to select the names of Engineers (email addresses of the enginners are pulled directly from Employee's table). If there are two engineers selected, I want to have a button to allow the user to click on it and it sends an email to the two selected engineers. How should I go about doing it?
I think I need something like:
Dim db As Database
Dim rsRecord As Recordset
Set db = CurrentDb()
Set rsRecord = db.OpenRecordset("ServiceEngineer",dbOpenDynaset)
That's as far as I know, I need help on the kind of search/find available for stepping through the right records in a query (containing 'ServiceEngineer' and 'Employee' table for the email addresses) so that I can send out the email.
Apprecaite any help rendered.
Last edited: