A
ArielZusya
I've got a continuous form, frmMain, that displays a list of the records in
tblMain. Each record appears as a hyperlink and when clicked the record will
open a form, frmInd, with just the record clicked displayed. I'd like to
have an unbound text field display some information on the frmMain based on
the record it's next to. I tried using the on current and the on load to do
an if-then statement to test the value in another field but that doesn't
work. That code was something like:
sub Form_Current()
if me.txtFirstName.value = "Joe" then
me.txtUnbound.value = "Hello Joe"
else
me.txtUnbound.value = "No Joe"
end if
end sub
or
Sub Form_Load ()
if me.txtFirstName.value = "Joe" then
me.txtUnbound.value = "Hello Joe"
else
me.txtUnbound.value = "No Joe"
end if
End Sub
This code seems to show all records the same as the first record so if the
first record has "Joe" in txtFirstName then all records will have "Hello Joe"
despite the value of txtFirstName on the other individual records. Is there
a way to make this work? Thanks!
tblMain. Each record appears as a hyperlink and when clicked the record will
open a form, frmInd, with just the record clicked displayed. I'd like to
have an unbound text field display some information on the frmMain based on
the record it's next to. I tried using the on current and the on load to do
an if-then statement to test the value in another field but that doesn't
work. That code was something like:
sub Form_Current()
if me.txtFirstName.value = "Joe" then
me.txtUnbound.value = "Hello Joe"
else
me.txtUnbound.value = "No Joe"
end if
end sub
or
Sub Form_Load ()
if me.txtFirstName.value = "Joe" then
me.txtUnbound.value = "Hello Joe"
else
me.txtUnbound.value = "No Joe"
end if
End Sub
This code seems to show all records the same as the first record so if the
first record has "Joe" in txtFirstName then all records will have "Hello Joe"
despite the value of txtFirstName on the other individual records. Is there
a way to make this work? Thanks!