I have 2 access forms,
In 1st form I am displaying reportname from my table
then I will select one record from 1st form and will press next button
now I want to display this reportname onto next 2nd form in a text box
but its not working
my code
[code=vb]
Private Sub EditReport_CB_C lick()
On Error GoTo Err_EditReport_ CB_Click
Dim DB As Database
Dim Rnv1 As String
Dim strSQL As String
Dim frm1 As New Form_F_reportWi zard1
Dim frm21 As New Form_F_reportWi zard21
Rnv1 = Me.REPORT_NAME_ CB.Value
frm21.SetFocus
frm21.ReportNam e_TB.SetFocus
frm21.ReportNam e_TB.Text = Rnv1 'here it shows the correct reportname
Dim stDocName1 As String
stDocName1 = "F_ReportWizard 1"
DoCmd.Close acForm, stDocName1
Exit_EditReport _CB_Click:
Exit Sub 'but after this line form 2 closed and no values are available.pleas e help!!!
Err_EditReport_ CB_Click:
MsgBox Err.Description
Resume Exit_EditReport _CB_Click
End Sub[/code]
In 1st form I am displaying reportname from my table
then I will select one record from 1st form and will press next button
now I want to display this reportname onto next 2nd form in a text box
but its not working
my code
[code=vb]
Private Sub EditReport_CB_C lick()
On Error GoTo Err_EditReport_ CB_Click
Dim DB As Database
Dim Rnv1 As String
Dim strSQL As String
Dim frm1 As New Form_F_reportWi zard1
Dim frm21 As New Form_F_reportWi zard21
Rnv1 = Me.REPORT_NAME_ CB.Value
frm21.SetFocus
frm21.ReportNam e_TB.SetFocus
frm21.ReportNam e_TB.Text = Rnv1 'here it shows the correct reportname
Dim stDocName1 As String
stDocName1 = "F_ReportWizard 1"
DoCmd.Close acForm, stDocName1
Exit_EditReport _CB_Click:
Exit Sub 'but after this line form 2 closed and no values are available.pleas e help!!!
Err_EditReport_ CB_Click:
MsgBox Err.Description
Resume Exit_EditReport _CB_Click
End Sub[/code]