Can not open an existing form with new critera

J

Josh

I am trying to get a Search form to display its' results in an existing form,
but I have having a very hard time trying to do this. In a module, I load in
the primary identifier, form name, and SQL into some variables, and then I
attempted to open the form via these codes:

Forms.Item(m_strFormName).RecordSource = m_strTempFromDataSQL &
m_lngSiteMtrNum

DoCmd.OpenForm m_strFormName, , , stLinkCriteria

After getting though a ton of various errors, I can get the form to open,
but I can never get the correct data to populate the form. The form has a
current recordsource of a query and is filtered by a primary ID. I do not
know if I am missing a step, not opening the form correctly, or just plain
missing something, but how do you properly open a form with a new primary ID?

Feel free to contact me at the address above minus the .removeme or using
these forms, and I thank anyone in advance for helping me with this problem,
 
Top