Consulting

Results 1 to 2 of 2

Thread: test for a text box

  1. #1
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    204
    Location

    test for a text box

    When I build (on the fly, with VBA) a form containing a text box, and the form is based on a Record Source SQL that is based on a table, and that contains a variable (in the SQL), AND If the variable is in the table all is well, the text box in the form shows the corresponding entry in the table. BUT, if the variable is NOT in the table the form does NOT have the text box, and tests on the content of the text box result in an error.

    Confused?

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    It sounds like a "null" value error, if you look at sql query then it will also not hold any values. If your form has another table field on it that does have a value the form will probably work OK even though the text box is blank. You can overcome this by making the default value for your table field either 0 for number values or " " for string values.

Posting Permissions

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