Was just about to do that. Here it is. Issues is the main form.
TTP.zip
Was just about to do that. Here it is. Issues is the main form.
TTP.zip
There is no form by that name. I see the code though, and if I add a message box:
strDocName = "TTP_Find"
DoCmd.OpenForm strDocName, , , , , acDialog
MsgBox "paul"
I don't get the message box until I close the find form. Am I misunderstanding the problem?
I'm so sorry! Apparently, I don't know where my issues really are (probably all in my head!). Turns out the REAL problem was that I was defining my public variables in the wrong place, and they weren't being updated properly. It seems to be working now. I apologize for wasting your time.
Hi -
I have looked at the DB - the modal forms are working as you expected them to. where you do have issues though is getting the selected values recognized between forms.
Take this line: Public varSelectedTTP As Variant, varFindTTP As Variant
and move it to the declarations section of the MiscCode module, so that your two variables are recognized everywhere.
You also have a problem with when you use those variables:
In your Select statement in Issues, you are using VarSelectedTTP (text) , when you should be using varFindTTP (numeric ID).
This line in the Issues form code is wrong: cboSystem!Value = !System
It should be cboSystem.Value = !System
One thing I suggest you always do - use Option Explicit in all your code modules.
This forces you to explicitly declare all variables with a Dim statement somewhere, and you would be amazed at how many errors that catches when you compile your code (which you should always do as well).
One thing you might want to do is add a few lines in TTP_Find to handle the case of a non-existant TTP number being entered and the Select button clicked.
HTH
John
Thank you. I will do that.
More info on John's suggestion:
http://www.baldyweb.com/OptionExplicit.htm