Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2010
    Posts
    39

    Unanswered: Appending record to a table only IF a field contains data

    I'm a bit stuck on how to run my append query.

    Basically, I only want the record to be appended to a table IF one of the fields contains data. This data is not in a set format or style however, so I cant set a restricted parameter.

    I have two of these queries, the first will only need to append data when order field "ONOS" contains data. The second is only when "PRINTED" has been ticked as yes.

    Help?

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Code:
    If Nz(Me.ONOS,"") <> "" Then
      'Run the first Append Query here
    End If
    Code:
    If Me.PRINTED = -1 Then
      'Run the second Append Query
    End If
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jan 2010
    Posts
    39
    Thanks, I also stumbled across putting in a wildcard (*) into the Query criteria on the first one, and putting (YES) into the Yes/No field one. However, thanks for the code as I'm going to convert it off into that anyway, as there's a bit of coding I need to do!
    I'm sure I'll be around with yet another query later, I'm building a monster of a database

Posting Permissions

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