Results 1 to 15 of 15

Thread: Form load

  1. #1
    Join Date
    Jan 2007
    Posts
    47

    Unanswered: Form load

    Hi,

    I have the following controls on my entry form which are entered by processor. All the below contorls gets stored in one main table appraisalreview.

    SSN, Auditor, Audit Type (scorecard), Review Type (combo), Project Type (combo) and other fields.

    I have start form where you can enter as a processor, analyst, appraiser. The controls on the entry form will be carried over from processor to analyst and appraiser. When you enter as a apparaiser and give SSN all the info that is asscoiated with SSn which were entered by processor will get loaded.

    My question is that I have to make Disputevalue control visisble when Appraiser laods the form. I tried with below code but the Disputevalue field doesn't show up. Can anayone plase help me with this. I am alos attaching the screen shots of start and entry forms.

    Form Load:

    If scorecard = "Appraiser" Then
    If review_type = "backend" And Project_Type = "disputes" Then
    Disputevalue1.Visible = True
    Else
    Disputevalue1.Visible = False
    End If
    End If

    Similar code:

    If scorecard = "Appraiser" Then
    Generaldata.Visible = True
    End If (This control perfectly works fine when form load but not the above code)

    Thanks,
    Attached Thumbnails Attached Thumbnails screen1.JPG   screen2.JPG  

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    One of these 2 statements is not evaluating to True
    review_type = "backend" And Project_Type = "disputes"
    Inspiration Through Fermentation

  3. #3
    Join Date
    Jan 2007
    Posts
    47
    Yes you are true. The above statement is getting false in the form load when scorecard is appraiser. But if you look at the screen shot the controls Review Type and Project Type are carried over from processor successfully. But still the above statement is not becoming true. I am not sure why?

  4. #4
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    I can't really read the screen shots. They're not too clear. Could it be a
    case-sensitive issue?
    Inspiration Through Fermentation

  5. #5
    Join Date
    Jan 2007
    Posts
    47
    I was trying a diiferent way by adding an after update event procedure for Project Type. This works fine when you enter the Project Type field instead of carrying it. But my database is coded in such a way that the Project Type and Review type fields are carried over to appraiser always. Below is the code I used for event.

    Private Sub Project_Type_AfterUpdate()

    If scorecard = "Appraiser" Then
    If Project_Type = "disputes" Then
    Disputevalue1.Visible = True
    Else
    Disputevalue1.Visible = False
    End If
    Else
    Disputevalue1.Visible = False
    End If

    End Sub

  6. #6
    Join Date
    Jan 2007
    Posts
    47
    No code or database is not case senstive. Is it possible to zoom the screen shot to view it clearly.

  7. #7
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Project type is a combo box. Could it be that you are using a 2 field combo box, with the bound field being a numeric key?
    Inspiration Through Fermentation

  8. #8
    Join Date
    Jan 2007
    Posts
    47
    No. It is weired it the Disputevalue works fine in an after update event procedure for Project Type (which i poseted it earlier). I was wondering how to make it work in form load when the fields are carried over.

  9. #9
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Define "Carried Over"
    Inspiration Through Fermentation

  10. #10
    Join Date
    Jan 2007
    Posts
    47
    Initially Processor enters the data (like Audit Type (scorecard), Review Type , Project Type and other fields) for a SSN (say 1234) into the form and this data gets stored into the main table. When an appraiser enters the form and give SSN (1234) all the data (Audit Type (scorecard), Review Type , Project Type and other fields) that was entered by processor intially gets loaded (carried over) auotmatically to avoid multiple entry data.

  11. #11
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Does the form know that the appraiser wants to view the record for SSN 1234 when opened, or does it take action after he selects the SSN from the text box?
    Inspiration Through Fermentation

  12. #12
    Join Date
    Jan 2007
    Posts
    47
    after the appraiser enters the SSN in the text box the data gets loaded.

  13. #13
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Ok. The form_load event occurs right after the form_open event.
    It won't run again when you change/update data. I think you want to
    use the OnCurrent event.
    Inspiration Through Fermentation

  14. #14
    Join Date
    Jan 2007
    Posts
    47
    Yes, the form_load event occurs right after the form_open event

    you mean put the below code in the form oncurrent event.

    If scorecard = "Appraiser" Then
    If review_type = "backend" And Project_Type = "disputes" Then
    Disputevalue1.Visible = True
    Else
    Disputevalue1.Visible = False
    End If
    End If

  15. #15
    Join Date
    Jan 2007
    Posts
    47
    I tried running the above code in the form oncurrent event but it didn't work yet.

Posting Permissions

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