G
Guest
I was hoping someone could direct me to a site or show me some example with
VBscript to work with a front end/back end application.
On the front end I want a form for employee time entry which will list all 7
days. We'll call it 'frm_timesheet'. On the backend I'll have a table
called 'tbl_timesheet'.
I want the frm_timesheet to be able to pull a record from the tbl_timesheet
datasource, if it exists. If no record exists, then I'd have other VB
script running to set default values (clock in, clock out times, etc, for the
individual selected).
I do not want any user made entry on the frm_timesheet to be saved
automatically by Access. The only way I want information to be saved is by
hitting a 'save' button.
The way I figured I could do this is with ADO code. ADO would call up the
tbl_timesheet and fill in the days of the week for frm_timesheet if an entry
exists for that individual. Otherwise default values, through VBScript,
would populate the fields. None of this data is saved, as they are sitting
in unbound fields on the form. When the save button it hit, the data in the
unbound fields will then be saved to the tbl_timesheet through ADO.
Obviously if an entry for that day and individual exists, I'd want the code
to overwrite the old entry - not create a new entry.
I'm not very familiar with ADO code. I was hoping someone could help me
with an example. Or if you know of a better way for me to go about doing
this.
If one could show me, in detail, how to have ADO code pull a field from the
tbl_timesheet and how to save a record if it is new or overwrite if it
exists, I can take the code from there and apply it to all my fields.
Please explain your code lines so I can understand what they do.
I'd really appreciate it.
Thanks!
VBscript to work with a front end/back end application.
On the front end I want a form for employee time entry which will list all 7
days. We'll call it 'frm_timesheet'. On the backend I'll have a table
called 'tbl_timesheet'.
I want the frm_timesheet to be able to pull a record from the tbl_timesheet
datasource, if it exists. If no record exists, then I'd have other VB
script running to set default values (clock in, clock out times, etc, for the
individual selected).
I do not want any user made entry on the frm_timesheet to be saved
automatically by Access. The only way I want information to be saved is by
hitting a 'save' button.
The way I figured I could do this is with ADO code. ADO would call up the
tbl_timesheet and fill in the days of the week for frm_timesheet if an entry
exists for that individual. Otherwise default values, through VBScript,
would populate the fields. None of this data is saved, as they are sitting
in unbound fields on the form. When the save button it hit, the data in the
unbound fields will then be saved to the tbl_timesheet through ADO.
Obviously if an entry for that day and individual exists, I'd want the code
to overwrite the old entry - not create a new entry.
I'm not very familiar with ADO code. I was hoping someone could help me
with an example. Or if you know of a better way for me to go about doing
this.
If one could show me, in detail, how to have ADO code pull a field from the
tbl_timesheet and how to save a record if it is new or overwrite if it
exists, I can take the code from there and apply it to all my fields.
Please explain your code lines so I can understand what they do.
I'd really appreciate it.
Thanks!