Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Strange query results
Don Wright 
    
13 years ago
Richard,
I am trying to do something with an append query, like in your tip.

I have a check register (CheckingT) and a JournalT.  In CheckingT I have a field called Posted (Yes/No).
I have a continuous form, PostedToJournalF, that is based on a select query.  The query has the Posted field, with the criteria set to False.  I wanted the form to open and only show transactions that had not yet been posted.

I set it up so that when PostToJournalF opens, I can check off every transaction (using the Posted field) I want to post.  A button runs the append query which also has the posted field, but with the criteria set to True.  I wanted it to only append those entries that i checked off.

Here's my code:
me.refresh  'to take care of any dirty records
Docmd.setwarnings False
Docmd.OpenQuery "PostToJournalQ"
Docmd.Setwarnings True

Me.Requery  'I wanted the foem to requery so any transaction I checked off would disappear

Everyhing appears to work!  Except it is appending records over and over again!

Example:  I open the forn and I see 3 records that need to be posted.  I check off the Posted field on transaction #1 and run the query. Transaction #1 disappears from the form.  A check of JournalT shows the appended record.  So far, so good.

I check off Transaction #2 and run the query.  Everything looks fine until I open JournalT --I see Transaction #1 twice, and Trans #2 once.
If I do it yet again, Trans #1 is tripled, #2 is doubled, etc.

Sorry to have this drag on.  I tried to be clear.  Any ideas on what I need to do?  Your help would be appreciated.

Thanks,
Don


Reply from Richard Rost:

I'd need to see your database to tell you for sure what the problem is, but have you tried running this with the warnings ON to see if it might be telling you something odd?

I'd want to run 2 queries: one to append the selected records, and then an update query to uncheck those boxes.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/16/2026 4:26:01 PM. PLT: 1s