recordset - list box error (for search record)

G

Guest

this form use to show to search a certain record in frmFindQuoteSheet and
after seleting in listbox(frmFindQuoteSheet) they will click the cmdFind to
pull the record and the form frmQuoteSheetMaster form appeared with the
selected record.

I'm having run time error 2450
Can't find form 'frmQuoteSheetMaster' referred to in a macro expression or
visual basic code. Thank you so much in advance....

Private Sub cmdFind_Click()

Dim frm As Form
Dim rst As Object

Set frm = Forms!frmQuoteSheetMaster
Set rst = frm.Recordset.Clone
rst.FindFirst "[Placing_ID] = " & "'" & lstFind & "'"
Forms!frm.Bookmark = rst.Bookmark
DoCmd.Close acForm, "frmFindQuoteSheet"

End Sub
 
G

Guest

Hi zweet18
This error I faced myself when using data from one form as input for the
other.
It acutally tells you that the form can not load the data as it is not active.
so...
first open the form by
DoCmd.OpenForm "frmQuoteSheetMaster"
and then pass through the data.

success,
Harry
 
G

Guest

It works!Thank u so much..... I really appreciate u're help.....

Harry said:
Hi zweet18
This error I faced myself when using data from one form as input for the
other.
It acutally tells you that the form can not load the data as it is not active.
so...
first open the form by
DoCmd.OpenForm "frmQuoteSheetMaster"
and then pass through the data.

success,
Harry

zweet18 said:
this form use to show to search a certain record in frmFindQuoteSheet and
after seleting in listbox(frmFindQuoteSheet) they will click the cmdFind to
pull the record and the form frmQuoteSheetMaster form appeared with the
selected record.

I'm having run time error 2450
Can't find form 'frmQuoteSheetMaster' referred to in a macro expression or
visual basic code. Thank you so much in advance....

Private Sub cmdFind_Click()

Dim frm As Form
Dim rst As Object

Set frm = Forms!frmQuoteSheetMaster
Set rst = frm.Recordset.Clone
rst.FindFirst "[Placing_ID] = " & "'" & lstFind & "'"
Forms!frm.Bookmark = rst.Bookmark
DoCmd.Close acForm, "frmFindQuoteSheet"

End Sub
 
G

Guest

Thanks again Harry

Harry said:
Hi zweet18
This error I faced myself when using data from one form as input for the
other.
It acutally tells you that the form can not load the data as it is not active.
so...
first open the form by
DoCmd.OpenForm "frmQuoteSheetMaster"
and then pass through the data.

success,
Harry

zweet18 said:
this form use to show to search a certain record in frmFindQuoteSheet and
after seleting in listbox(frmFindQuoteSheet) they will click the cmdFind to
pull the record and the form frmQuoteSheetMaster form appeared with the
selected record.

I'm having run time error 2450
Can't find form 'frmQuoteSheetMaster' referred to in a macro expression or
visual basic code. Thank you so much in advance....

Private Sub cmdFind_Click()

Dim frm As Form
Dim rst As Object

Set frm = Forms!frmQuoteSheetMaster
Set rst = frm.Recordset.Clone
rst.FindFirst "[Placing_ID] = " & "'" & lstFind & "'"
Forms!frm.Bookmark = rst.Bookmark
DoCmd.Close acForm, "frmFindQuoteSheet"

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top