VBA Programming Difficulty

Posted on 2012-09-12
Last Modified: 2012-09-12
I have a form with 5 muti_list boxes that allow users to create ad-hoc queries.  After a query is run and the form closed, a record in the datatable loses several variables.  Only one record.  Can't figure out what's going on.  My VB code is attached.  Any help would be greatly appreciated.
Question by:hbrown1956
    LVL 56

    Expert Comment

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    <<a record in the datatable loses several variables.>>

     What data table? and do you mean field or variables?

     There's nothing wrong with your code as it stands.

    LVL 56

    Expert Comment

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    BTW, what's rst (qry_ALL) used for?

    LVL 119

    Accepted Solution

    there is nothing in  the code you posted that will cause a record to lose some data..

    investigate further, if there are other codes running that is causing the problem.

    you can step through your codes by inserting a  line with Stop command, then hit F8  one at a time to move to your codes line by line

    Author Comment


    qry_all is built on the table that's missing the field...not variable, my mistake.  I was trying to use a recordset to see if it would help.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now