Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004

    Unanswered: Problem with sub forms, plz help...


    This sub has the following problem, at line :

    BIENS = Form_VerifBalance.balance_biens

    I get the following message:

    Run-time Error '91': Object variable or With block variable not set

    The sub is in the main form, that is named VerifBalance. There are 4 sub-forms named ; VerifBalance1, VerifBalance2, VerifBalance3 and VerifBalance4.

    Im trying to set the value for the balance_biens box with the BIENS variable.


    Public Sub Calculus()

    Dim RepBiensPast As Double
    Dim RepBiensPres As Double
    Dim RepBiensHPPast As Double
    Dim RepBiensHPPres As Double
    Dim RepAutoPast As Double
    Dim RepAutoPres As Double
    Dim RepCGLPast As Double
    Dim RepCGLPres As Double

    Dim TabBiensPast As Double
    Dim TabBiensPres As Double
    Dim TabAutoPast As Double
    Dim TabAutoPres As Double
    Dim TabCGLPast As Double
    Dim TabCGLPres As Double

    Dim BIENS As TextBox
    Dim CGL As TextBox
    Dim AUTO As TextBox

    Dim BiensPst As TextBox
    Dim CGLPst As TextBox
    Dim AutoPst As TextBox

    RepBiensPast = Form_VerifBalance1.[SOMMAIRE_BIENS_PAST_0_SUM]
    RepBiensPres = Form_VerifBalance1.[SOMMAIRE_BIENS_PRES_0_SUM]
    RepBiensHPPast = Form_VerifBalance1.[SOMMAIRE_BIENS_PAST__1_SUM]
    RepBiensHPPres = Form_VerifBalance1.[SOMMAIRE_BIENS_PRES__1_SUM]
    RepAutoPast = Form_VerifBalance1.[SOMMAIRE_AUTO_PAST_0_SUM]
    RepAutoPres = Form_VerifBalance1.[SOMMAIRE_AUTO_PRES_0_SUM]
    RepCGLPast = Form_VerifBalance1.[ANC_PR_CGL_SUM]
    RepCGLPres = Form_VerifBalance1.[Prime_CGL_SUM]

    TabBiensPast = Form_VerifBalance2.[ANC_PR_SUM2]
    TabBiensPres = Form_VerifBalance2.[Prime_biens_SUM2]
    TabAutoPast = Form_VerifBalance3.[PRIME_Past_SUM3]
    TabAutoPres = Form_VerifBalance3.[PRIME_SUM3]
    TabCGLPast = Form_VerifBalance4.[ANC_PR_CGL_SUM4]
    TabCGLPres = Form_VerifBalance4.[Prime_CGL_SUM4]

    BIENS = Form_VerifBalance.balance_biens
    CGL = Form_VerifBalance.balance_cgl
    AUTO = Form_VerifBalance.balance_auto
    BiensPst = Form_VerifBalance.balance_bienspst
    CGLPst = Form_VerifBalance.balance_cglpst
    AutoPst = Form_VerifBalance.balance_autopst_BeforeUpdate

    If (RepBiensPast + RepBiensHPPast) = TabBiensPast Then
    Detail.BackColor = 16772055
    BiensPst = "BALANCED"
    Detail.BackColor = 13034239
    BiensPst = "UN-BALANCED"
    End If


    End Sub


    Thanx in advance!

  2. #2
    Join Date
    Nov 2004
    Anyone has an idea?

  3. #3
    Join Date
    Nov 2004
    Nevermind, I found it,... had to use

    Set BIENS = balance_biens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts