I am wanting to take the hyperlink that is entered on a form (As a hyperlink) to the table it needs to go to, through VBA. I am using Access 2010. It keeps giving me a SQL statement error. I know it has to do with the hyperlink #'s signs. I do not quite grasp how hyperlinks are handled. I have read plenty of forum posts, but they all are different (Different years), and I can't seem to hack up their examples to meet my needs. Can anyone please let me know what it is that I am doing wrong? Thanks
Private Sub SaveReq_Click()
'
' Saves the current entry to the database
' Into the TABLE 'pr_req_table'
'
' Open a connection to the database
dim data_base as Database
set data_base = OpenDatabase(CurrentProject.Path & "\test_database.accdb")
' Grab all information from form
' Add information to pr_req_table
data_base.Execute "INSERT INTO pr_req_table " _
& "(pr_no, pr_date, pr_owner, pr_link, pr_signed) " _
& "VALUES (" & pr_num.Value & ", #" & Format(pr_date.Value, "mm/dd/yyyy") & "#, " _
& List22.Value & ", " & "Excel Copy #" & elec_copy.Value & ", " & "Signed Copy #" & sign_copy.Value & ");"
' Close Database connection
data_base.Close
End Sub
Thanks in advance for any help!
Nathan
elec_copy.Value
? – Holger Brandt Jul 9 '12 at 21:45