Go easy on me- I barely know any VB at all!
I'm trying to get a form to look up the information so that when I enter an item number, it'll go to another form and give me the information relevant to that number.
In short, it locks up on the "itemdata" part of the indicated line with a compiling error (Method or Data Member Not Found). I'm just trying to get to the data quickly, so that I can enter an AccessionNumber, and have it go to the correct frm_edit_seeds_sub3 form that corresponds with that number.
Help! Thanks in advance.
Private Sub AccessionQuickLookup_KeyPress(KeyAscii As Integer)
Dim stDocName As String
Dim intSeedID As Integer
Dim intSelected As Integer
Dim stLinkCriteria As String
Dim AccessionNumber As String
If KeyAscii = 13 Then
Me.Refresh
AccessionNumber = AccessionQuickLookup.Value
AccessionQuickLookup.Value = ""
---> intSeedID = Me.AccessionQuickLookup.ItemData(intSelected)
stDocName = "frm_edit_seeds_sub3"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.OpenForm "frm_edit_seeds_sub3", acNormal, , , , , intSeedID
End If
End Sub
I'm trying to get a form to look up the information so that when I enter an item number, it'll go to another form and give me the information relevant to that number.
In short, it locks up on the "itemdata" part of the indicated line with a compiling error (Method or Data Member Not Found). I'm just trying to get to the data quickly, so that I can enter an AccessionNumber, and have it go to the correct frm_edit_seeds_sub3 form that corresponds with that number.
Help! Thanks in advance.
Private Sub AccessionQuickLookup_KeyPress(KeyAscii As Integer)
Dim stDocName As String
Dim intSeedID As Integer
Dim intSelected As Integer
Dim stLinkCriteria As String
Dim AccessionNumber As String
If KeyAscii = 13 Then
Me.Refresh
AccessionNumber = AccessionQuickLookup.Value
AccessionQuickLookup.Value = ""
---> intSeedID = Me.AccessionQuickLookup.ItemData(intSelected)
stDocName = "frm_edit_seeds_sub3"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.OpenForm "frm_edit_seeds_sub3", acNormal, , , , , intSeedID
End If
End Sub