david7777777777
Programmer
I currently have an ASP page that contains recordsets, combo boxes, and some textboxes used to enter a new record into the SQL 2000 database. To add a new record, I'm using the method where you click a button (btnNewEntry) to "initialize" a new blank record in the recordset (rsTapes), then you use the DTC textboxes, combo boxes, an d so on to enter the data for the new record, then you click the Save button (btnSave) to actually save the new record.
Here is the relevent code for these two buttons:
The NEW ENTRY button:
Sub btnNewEntry_onclick()
rsTapes.addRecord
The SAVE button:
Sub btnSave_onclick()
dim fieldsarray(11)
dim valuesarray(11)
fieldsarray(0) = "lstOrigin"
fieldsarray(1) = "lstDestination"
and so on.........
rsTapes.updateRecord fieldsarray, valuesarray
THE PROBLEM:
Currently, I have a hyperlink on a page that brings up the initial [New Entry] button. The user then clicks the [New Entry] button and all of the DTC's become visible so they can enter the data, and then click the [Save] button.
THE PREFERRED SOLUTION
What I'd like to have is this: when they click on that hyperlink (text) on the navigation page, I want that click to also do the job of the [New Entry] button by initializing the new blank record for the recordset (rsTapes). I think the page object has to be involved for this to work but I cannot seem to figure out how to make it work according to the book and help files. Can anyone explain this process to me please? Thanks.
Here is the relevent code for these two buttons:
The NEW ENTRY button:
Sub btnNewEntry_onclick()
rsTapes.addRecord
The SAVE button:
Sub btnSave_onclick()
dim fieldsarray(11)
dim valuesarray(11)
fieldsarray(0) = "lstOrigin"
fieldsarray(1) = "lstDestination"
and so on.........
rsTapes.updateRecord fieldsarray, valuesarray
THE PROBLEM:
Currently, I have a hyperlink on a page that brings up the initial [New Entry] button. The user then clicks the [New Entry] button and all of the DTC's become visible so they can enter the data, and then click the [Save] button.
THE PREFERRED SOLUTION
What I'd like to have is this: when they click on that hyperlink (text) on the navigation page, I want that click to also do the job of the [New Entry] button by initializing the new blank record for the recordset (rsTapes). I think the page object has to be involved for this to work but I cannot seem to figure out how to make it work according to the book and help files. Can anyone explain this process to me please? Thanks.