mariobro said:
sorry for the confusion but i'm new on this stuff i've alway use
access just as a reporting front end, this is the first time that i'm
developing a complete application with it. I trie the dbengine.idle
statement and didn't work. The reason that i'm using unbound forms is
because before i started the application i started reading a book
about programming in access (specially creating multiuser
applications, which is what i need), one of the advices that the
authors give on the book is working with unbound forms, so i start
playing with them and at the beginig i like them (mainly because of
the freedom that they gave on using a single form to edit or add data
to the table without the need of specifying in which mode to open the
form, or in the case of edit mode always need to deal with the 1st
record of the table) but as i was working it started to get a litle
more complicated that i excpected (for example the sql commands to
open the recordset did'nt work properly that's why i'm dealing with
the connection object, at least that was the only solution that i
could come up with), still i would like to keep the application as it
is since the users started to use it and they like the way it's
currently working. they just ask me to add the functionality of be
able to add records to an lookup table which is where i'm stuck on.
Also one of the other recommendation on the book was to move away
from DAO and start using ADO.
Actually, I don't agree with the author's advice to use unbound forms,
though it's certainly an approach that I understand -- more so when
dealing with a client/server data store like SQL Server. But in
general, my policy is to let Access do what it was designed to do
wherever possible. There are many techniques for working with multiuser
databases, even using bound forms. And I certainly don't agree with the
author's recommendation to move from DAO to ADO, if you're working with
MDB files. Even Microsoft has backed away from that recommendation.
Please correct me if I'm wrong, and I really don't mean to give offense,
but it sounds to me as though you have programmed quite a bit of code
that you don't fully understand, and now you're being bitten by issues
stemming from the complexity of that code. It's not really possible for
me to debug the code without seeing it, and there's too much of it for
you to post it all, even if you wanted to. All I can say from the
information available is that I believe that you need to update your
lookup tables using the same connection that Access is using, if you
want your updates to be immediately visible in combo and list boxes. So
if your combo box uses a rowsource that pulls data from a linked table,
use that linked table to update the table, and use the CurrentDb.Execute
(DAO) or CurrentProject.Connection.Execute (ADO) method to do it.