Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013

    Question Unanswered: how to change a combobox based on selection, number field to 0 on a main access form

    Hey there any help will be appreciated Thanks I got a combobox field = name(txtCombo) And a numberField = (txtNumber)

    Im getting a error something wrong with my code any help will be highly appreciated.Thanks

    Private Sub txtCombo_Click()
    If Me.txtCombo.Value = "Meter" Then
    Me.txtNumber.Value = 0
    End If
    End Sub
    error imn my code:

    Run time error: '2448' You cant assign a value to a object, due to this code I cant continue my calcuation!!!

    If I select the Meter value it must change the txtNumber to 0

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    The error message indicated that txtNumber, for whatever reason, cannot have a Value assigned like this.

    Is txtNumber Bound to a Field in the underlying Table?

    Is it a Calculated Field, i.e does it have an Expression in the Control Source, or is it Calculated in a Query? Is it defined as an AutoNumber in the tabledef?

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Tags for this Thread

Posting Permissions

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