R
Rod Behr
The final line of this code returns an unexpected error:
DoCmd.OpenForm "CodecGotoHidden", acNormal, "", "", , acHidden
Forms!CodecGotoHidden!Codec = Forms![codecselect subform]!CodecID
DoCmd.OpenForm "CodecMain", acNormal, "", "", , acNormal
DoCmd.GoToControl CodecID
DoCmd.FindRecord Forms!CodecGotoHidden!Codec
When I search for the value of Forms!CodecGotoHidden!Codec in the CodecID
field of the CodecMain form, an error box tells me "There is no field named
'6' in the current record" (6 is the value of Forms!CodecGotoHidden!Codec).
I am not searching for a field! I am searching for a record whose CodecID
(the Primary Key for that dataset) matches Forms!CodecGotoHiddel!Codec.
Access Help tells me that the FindRecord method should mimic the function of
"Edit", "Find" from the drop-down menu, but it clearly isn't doing so. What
am I doing wrong?
DoCmd.OpenForm "CodecGotoHidden", acNormal, "", "", , acHidden
Forms!CodecGotoHidden!Codec = Forms![codecselect subform]!CodecID
DoCmd.OpenForm "CodecMain", acNormal, "", "", , acNormal
DoCmd.GoToControl CodecID
DoCmd.FindRecord Forms!CodecGotoHidden!Codec
When I search for the value of Forms!CodecGotoHidden!Codec in the CodecID
field of the CodecMain form, an error box tells me "There is no field named
'6' in the current record" (6 is the value of Forms!CodecGotoHidden!Codec).
I am not searching for a field! I am searching for a record whose CodecID
(the Primary Key for that dataset) matches Forms!CodecGotoHiddel!Codec.
Access Help tells me that the FindRecord method should mimic the function of
"Edit", "Find" from the drop-down menu, but it clearly isn't doing so. What
am I doing wrong?