So I pass the ID value from one form to the next using
Docmd.OpenForm "SecondForm",,,,,, MainID
Docmd.Close AcForm, "FirstForm", acSaveYes
and then I check the value on the Second Form's load event:
MainID = val(Me.OpenArgs)
and when I debug and step through I hover over this and can see it contains a value
Then I have a button click event on the Second Form that is supposed to repeat the process, but when I run the following
Dim rs as DAO.Recordset
Dim dbs as DAO.Database
Set dbs = CurrentDB
Set MyRS = dbs.OpenRecordset("tblMain")
If MyRS!MainID = MainID THen
after that its some rs.edit, etc stuff....the routine is not even making it that far. Once I do the same debug and hover, the value here is empty. Is there something I am missing because I can see the value on the forms load event, but once i try to use it in another action it is MIA
thanks justin