Re: setting hyperlink value in DAO 3.51 using an update query
From: Lance Crumbliss (chuckyboy81070_at_REMOVE2REPLY..hotmail.com)
Date: 05/16/04
- Next message: david epsom dot com dot au: "Re: mydb.close"
- Previous message: DIOS: "Re: merge multiple databases"
- In reply to: Jeff Johnson [MVP: VB]: "Re: setting hyperlink value in DAO 3.51 using an update query"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 16 May 2004 14:36:58 -0500
here's the sub...
Private Sub cmdButton_Click(Index As Integer)
Dim strSQL As String
Dim strHyperlink As String
On Error GoTo cmdButton_Click_Error
If Text1(7) <> "" Then
strHyperlink = Text1(7) & "#" & Text1(7)
Else
strHyperlink = ""
End If
strSQL = "UPDATE Points SET Points.Description = """ & Text1( _
4) & """,Points.County = """ & cboAllCounty & """,Points.Hyperlink =
""" & strHyperlink & _
""",Points.TypeOfPoint = """ & cboTypeOfPoint(0) &
""",Points.DepthOfCover = """ & Text1( _
8) & """,Points.PDOP = """ & Text1(9) & """, Points.Date = #" &
Format(dtDateOfCollection.Value, _
"mm/dd/yyyy") & "# WHERE Points.ID_In_Project = " & Text1(0) & ";"
Select Case Index
Case cmdMoveFirst
Data1.Recordset.MoveFirst
Case cmdMovePrevious
Data1.Recordset.MovePrevious
Case cmdMoveNext
Data1.Recordset.MoveNext
Case cmdMoveLast
Data1.Recordset.MoveLast
End Select
On Error GoTo 0
Exit Sub
cmdButton_Click_Error:
MsgBoxEx "Error " & Err.Number & " (" & Err.Description & _
") in procedure cmdButton_Click of Form frmMain at line " & Erl,
vbInformation, "Error"
End Sub
"Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message
news:u2R$jkfOEHA.680@TK2MSFTNGP11.phx.gbl...
>
> "lance" <here@there.com> wrote in message
> news:%23rjCIKfOEHA.3744@TK2MSFTNGP11.phx.gbl...
>
>> but not when the query uses this string:
>>
>> UPDATE Points SET Points.Hyperlink = "c:\id.jpg#c:\id.jpg" WHERE
>> Points.ID_In_Project = 1;
>>
>>
>> again, it's just the link that isn't passed.
>
> Can you post the code that's generating and executing this query?
>
>
- Next message: david epsom dot com dot au: "Re: mydb.close"
- Previous message: DIOS: "Re: merge multiple databases"
- In reply to: Jeff Johnson [MVP: VB]: "Re: setting hyperlink value in DAO 3.51 using an update query"
- Messages sorted by: [ date ] [ thread ]