Great Day, I have created a table that I am placing my help files in, and it has the following fields:
HelpFileID - Autonumber (KF)
HelpSubject - Text
HelpFile - Memo
On every form that has a help button, I place an unbound text box, txtHelpID that is defaulted with the number of the help file I'd like to display in a popup form. Consequently, if for example I have a help button on my customers form, when it opens, txtHelpID will have a 3 in it, since the help file in tblHelpFiles for customers has 3 as its ID. So to me, everything seems to match, but when I click the "Help" button, I get the following error message: "Text mismatch."
Here is the code that opens the popup help form:
Private Sub cmdHelp_Click()
On Error GoTo Err_cmdHelp_Click
Dim stDocName As String
Dim stLinkCriteria As Integer
stDocName = "frmHelpFiles"
stLinkCriteria = "[HelpFileID]=" & Me.txtHelpID
DoCmd.OpenForm stDocName, , , stLinkCriteria