To find the value of the 2ndHeader field in the form, where Identifier is
"Bravo":
With Me.RecordsetClone
.FindFirst "[Identifier] = ""Bravo"""
If .NoMatch Then
MsgBox "Not found"
Else
MsgBox "2ndHeader is" & !2ndHeader
End If
End With
Notes:
1. If the Identifier is a Number type field, drop the extra quotes, e.g.:
.FindFirst "[Identifier] = 99"
2. It might be easier to lookup the value in the table the form is based on:
DLookup("2ndHeader", "MyTable", "[Identifier] = ""Bravo""")
For help with DLookup(), see:
http://users.bigpond.net.au/abrowne1/casu-07.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to the newsgroup. (Email address has spurious "_SpamTrap")
"gg" <(E-Mail Removed)> wrote in message
news:076601c34ce6$90508150$(E-Mail Removed)...
> I am working with a form and moving the focus to certain
> fields based on other factors using VBA. How do I get the
> value of that field so that I can use it in other
> calculations? It must be simple, but I can't find it.
>
> Example.
> Identifier 1stheader 2ndheader 3rdheader etc.
> alpha 1 4 5
> bravo 3 5 6
> charlie 5 8 9
> etc.
>
> Depending on the outcome of other calcs, I might want to
> move to Bravo and get the value of 2ndHeader. I can get
> there, but don't know how to extract the value
>
> Can someone recommend a book for access vba. I have the
> step by step book, but it is hard to use as a reference,
> more of a course book.