Run Time Error 91: Object Variable not set..... 
Author Message
 Run Time Error 91: Object Variable not set.....

This is a multi-part message in MIME format.

------=_NextPart_000_01BC8DBA.A604D7E0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I get the folowing error:
"Runtime Error 91
Object Variable or With block not set"
When I invoke the Calendar_Click() event
Although I Set tBox to C when I Display the form some how upon exiting
Display the value of Tbox is lost... Please help!!!

******The Code**********
Public Tbox As TextBox

Public Sub Display(C As TextBox)
    Set Tbox = C
    DoCmd.OpenForm "Cal"
    Form_Cal!Calendar.Visible = True
    Tbox.Value = Form_Cal!Calendar.Value
End Sub

Private Sub Calendar_Click()
    Tbox.Value = Form_Cal!Calendar.Value ' <+++++++The problem
    DoCmd.Close acForm, "Cal"
End Sub

--
Rashid Maher
:-)  Surf On

------=_NextPart_000_01BC8DBA.A604D7E0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">I get the folowing =
error:<br>&quot;Runtime Error 91<br>Object Variable or With block not =
set&quot;<br>When I invoke the Calendar_Click() event<br>Although I Set =
tBox to C when I Display the form some how upon exiting Display the =
value of Tbox is lost... Please help!!!<br><br>******The =
Code**********<br>Public Tbox As TextBox<br><br>Public Sub Display(C As =
TextBox)<br> &nbsp;&nbsp;&nbsp;Set Tbox =3D C<br> =
&nbsp;&nbsp;&nbsp;DoCmd.OpenForm &quot;Cal&quot;<br> =
&nbsp;&nbsp;&nbsp;Form_Cal!Calendar.Visible =3D True<br> =
&nbsp;&nbsp;&nbsp;Tbox.Value =3D Form_Cal!Calendar.Value<br>End =
Sub<br><br>Private Sub Calendar_Click()<br> &nbsp;&nbsp;&nbsp;Tbox.Value =
=3D Form_Cal!Calendar.Value ' &lt;+++++++The problem<br> =
&nbsp;&nbsp;&nbsp;DoCmd.Close acForm, &quot;Cal&quot;<br>End =
Sub<br><br><br>-- <br>Rashid Maher<br>:-) &nbsp;Surf On<br><font =

</font></font></font></body></html>
------=_NextPart_000_01BC8DBA.A604D7E0--



Tue, 28 Dec 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Run Time Error 91: Object variable or With Block variable not set

2. Object Variable not set , Run Time error 91, please Help

3. HELP : Error 91 : Run-Time Error 91 Object Variable or With

4. Object variable or With block variable not set (Error 91)

5. error 91 Object Variable o on with block variable is not set

6. Runtime error 91/Object variable or With block variable not set problems

7. runtime error: 91 Object variable or with block variable not set

8. Object variable or With block variable not set (Error 91) Please Help

9. VB 5.0 - Error:91 Object Variable Or With Block Variable Not Set

10. Object variable or With block variable not set (Error 91)

11. Error 91 Object variable or With-Block, variable not set

12. Error 91 - Object Variable Not Set **** Need Help

 

 
Powered by phpBB® Forum Software