G
Guest
I'm trying to create a hyperlink based on a concatenation of data from bound
textboxes on my form. I'm using the following to do the concatenation:
Public Function Concatenate(a, b, c, d)
a = "R:\PRIVATE\OM\BHCS\ASP-AP requests\"
b = txtLName
c = txtMMIS
If txtBHCSrcpt Like "##/##/####" Then
d = Left(Me.txtBHCSrcpt, 2) + Left(Right(txtBHCSrcpt, 7), 2) +
Right(txtBHCSrcpt, 2)
ElseIf txtBHCSrcpt Like "#/##/####" Then
d = "0" + Left(Me.txtBHCSrcpt, 1) + Left(Right(txtBHCSrcpt, 7), 2) +
Right(txtBHCSrcpt, 2)
ElseIf txtBHCSrcpt Like "#/#/####" Then
d = "0" + Left(Me.txtBHCSrcpt, 1) + "0" + Left(Right(txtBHCSrcpt,
6), 1) + Right(txtBHCSrcpt, 2)
End If
Concatenate = a & b & "-" & c & "\" & d
End Function
txtBHCSrcpt is a date field that stores that data in one of the three ways
listed in my if...then statement.
Then in the afterupdate event for txtBHCSrcpt I have:
Me.txtDocLink = Concatenate(a, b, c, d)
I want the result to be similar to
R:\PRIVATE\OM\BHCS\ASP-AP requests\SMITH-123456789012\060607
My problem is that even though the resulting concatenation "looks" correct
on the form and also in the table, the hyperlink won't work. (The field type
is hyperlink in the table). BUT, if I enter the text box on the form, go to
the end of the link text and hit the delete button one time the link will
work. I can't figure it out. There is nothing displayed on the screen that
I'm deleting.
This is driving me insane. Any ideas?
Thanks,
Lesli
P.S. I'm not married to this solution (especially since it's not working),
so if anyone has an easier idea I'd be pleased to hear it!
textboxes on my form. I'm using the following to do the concatenation:
Public Function Concatenate(a, b, c, d)
a = "R:\PRIVATE\OM\BHCS\ASP-AP requests\"
b = txtLName
c = txtMMIS
If txtBHCSrcpt Like "##/##/####" Then
d = Left(Me.txtBHCSrcpt, 2) + Left(Right(txtBHCSrcpt, 7), 2) +
Right(txtBHCSrcpt, 2)
ElseIf txtBHCSrcpt Like "#/##/####" Then
d = "0" + Left(Me.txtBHCSrcpt, 1) + Left(Right(txtBHCSrcpt, 7), 2) +
Right(txtBHCSrcpt, 2)
ElseIf txtBHCSrcpt Like "#/#/####" Then
d = "0" + Left(Me.txtBHCSrcpt, 1) + "0" + Left(Right(txtBHCSrcpt,
6), 1) + Right(txtBHCSrcpt, 2)
End If
Concatenate = a & b & "-" & c & "\" & d
End Function
txtBHCSrcpt is a date field that stores that data in one of the three ways
listed in my if...then statement.
Then in the afterupdate event for txtBHCSrcpt I have:
Me.txtDocLink = Concatenate(a, b, c, d)
I want the result to be similar to
R:\PRIVATE\OM\BHCS\ASP-AP requests\SMITH-123456789012\060607
My problem is that even though the resulting concatenation "looks" correct
on the form and also in the table, the hyperlink won't work. (The field type
is hyperlink in the table). BUT, if I enter the text box on the form, go to
the end of the link text and hit the delete button one time the link will
work. I can't figure it out. There is nothing displayed on the screen that
I'm deleting.
This is driving me insane. Any ideas?
Thanks,
Lesli
P.S. I'm not married to this solution (especially since it's not working),
so if anyone has an easier idea I'd be pleased to hear it!