Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8214313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:25:11+00:00 2026-06-07T11:25:11+00:00

I am wanting to take the hyperlink that is entered on a form (As

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:25:12+00:00Added an answer on June 7, 2026 at 11:25 am

    I would use a parameter query as follows:

    Sub InsertRecord()
    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
    Dim qd As QueryDef
    Set qd = data_base.CreateQueryDef("")
    qd.sql = "INSERT INTO pr_req_table(pr_no, pr_date, pr_owner, pr_link, pr_signed) " & _
        "values([p1],[p2],[p3],[p4],[p5])"
    qd.Parameters("p1").Value = pr_num.Value
    qd.Parameters("p2").Value = Format(pr_date.Value, "mm/dd/yyyy")
    qd.Parameters("p3").Value = List22.Value
    qd.Parameters("p4").Value = "Excel Copy #" & elec_copy.Value
    qd.Parameters("p5").Value =  "Signed Copy #" & sign_copy.Value 
    qd.Execute
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wanting a simple string table that will store a bunch of constants
I am unsure of what path I should take for what I am wanting
I am wanting to take a string of say the following: Guiness Harp Holy
I have an object that can take anywhere from a split second to a
I have a client that I'm wanting to move to a virtual private server.
Take the example of wanting to have a Latest news items sidebar on every
morning. I am wanting to take all segments of php code out of a
I am wanting to perform a Threshold query, whereby one would take the Value
I'm wanting to take the HTML generated by a QTextEdit editor and transform it
I am wanting to implement automated testing, using the Microsoft testing framework in Visual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.