Hi all,
Hope this isn't too "nub" of a question but I'm a little stuck.
I have a form which is used to add or view records. When viewing a record, I have a control button that, when clicked, copies the values in the text fields and dropdowns and inserts them into an update table. I have 2 problems with this...
1) one of the fields errors, giving me the following error, and I don't know what this means
Compile error: Method or data member not found
2) 2 of the values do not get passed into the update table. For the life of me, I cannot figure this out. My code from the command button is below and I'd appreciate any help I can get.
Thanks
Hope this isn't too "nub" of a question but I'm a little stuck.
I have a form which is used to add or view records. When viewing a record, I have a control button that, when clicked, copies the values in the text fields and dropdowns and inserts them into an update table. I have 2 problems with this...
1) one of the fields errors, giving me the following error, and I don't know what this means
Compile error: Method or data member not found
2) 2 of the values do not get passed into the update table. For the life of me, I cannot figure this out. My code from the command button is below and I'd appreciate any help I can get.
Thanks
Code:
Private Sub CopyToUpdates_Click()
'declare variables for holding data
Dim page_id As String
Dim page_file_name As String
Dim section_name As String
Dim contact_name As String
Dim content_type As String
Dim content_review_period As String
Dim page_last_updated As String
Dim expires As String
Dim page_status As String
Dim request_date
request_date = Date
Dim strSQLApp, strSQLDel As String
'load variables from data on form
page_id = Me.page_id
page_file_name = Me.page_file_name
section_name = Me.section_name
contact_name = Me.contact_name
content_type = Me.content_type
content_review_period = Me.content_review_period
page_last_updated = Me.page_last_updated
expires = Me.expires
page_status = Me.page_status
strSQLApp = "INSERT INTO update_html (page_id, page_file_name, section_name, contact_name, content_type, content_review_period, page_last_updated, request_date) VALUES ('" & page_id & "', '" & page_file_name & "','" & section_name & "', '" & contact_name & "', '" & content_type & "', '" & content_review_period & "', '" & page_last_updated & "', '" & request_date & "')"
DoCmd.RunSQL (strSQLApp)
End Sub