|
-
Mar 27th, 2000, 10:35 PM
#1
Thread Starter
New Member
I'm using Data Enviroment Designer to link to my Access 2000 database in VB6.
When a user clicks on the Find command, a pop-up window appears and the user double-clicks on the BookID. That information should appear in the program, but it doesn't.
Here's the code from frmBuyer:
Private Sub cmdFind_Click()
'
' call find pop-up dialog
'
Me.Key = ""
'
frmFind.Show vbModal
'
If Me.Key <> "" Then
With deBooks6.rscomBuyers
.MoveFirst
.Find "BuyerID=' " & Me.Key & " ' "
End With
End If
'
Unload frmFind
End Sub
Here's the code from frmFind pertaining to the FlexGrid:
Private Sub MSHFlexGrid1_DblClick()
'
' pass selected record to caller
'
With Me.MSHFlexGrid1
If .Col = 0 Then
frmBuyers.Key = .Text
Me.Hide
End If
End With
'
End Sub
Can anyone tell me why it's not pulling into the main program? Using debug to step-thru, .Find "BuyerID=' " & Me.Key & " ' " does show that me.key contains the value of the BuyerID field from the FlexGrid when it is double-clicked.
-
Mar 27th, 2000, 11:34 PM
#2
Guru
You have a space before and after the single quote
.Find "BuyerID=' " & Me.Key & " ' "
try this:
.Find "BuyerID= '" & Me.Key & "'"
HTH
Tom
-
Mar 28th, 2000, 12:06 AM
#3
Thread Starter
New Member
No spaces in quotes
I copied your suggestion into my code and reran it but to no avail. It still doesn't pull in. The spaces you see were put there by VB6 but are not really spaces.
I'm at my wits end.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|