473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can't read data from a table after saving record from a form

I edit data from a form by using docmd.close acform, formname,
acsaveyes. The form closes properly and returns the control to the
father form as it should be.
The problem is that when from the father form I try to access the new
data from the table which was related to the closed (child) form, for
example using dlookup(), I can't retrieve new data. I have to close all
the forms and restart the program to be able to read the new data from
the table.
Somehow, data are not written to the table and are probably hanging
somewhere in a buffer. How can I save data to the table so it can be
used right away without closing the application?
Tks

Nov 12 '05 #1
1 1868
Your DoCmd.Close ... syntax doesn't save the data, is saves any Form Design
work you've done. If your form is bound, then Access should save that data
for you (there can be a slight delay in writing to the tables). You
shouldn't have to close and reopen Access in order to see your new data; it
should be available as soon as it's saved to the table.

Note that you can force data to be saved by issuing this command:

If Me.Dirty then Me.Dirty = False

If I have misunderstood your question, please clarify.
--
Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP

"Smash forehead on keyboard to continue ... "
"ARobi" <ar***@nospam.com> wrote in message
news:40**************@nospam.com...
I edit data from a form by using docmd.close acform, formname,
acsaveyes. The form closes properly and returns the control to the
father form as it should be.
The problem is that when from the father form I try to access the new
data from the table which was related to the closed (child) form, for
example using dlookup(), I can't retrieve new data. I have to close all
the forms and restart the program to be able to read the new data from
the table.
Somehow, data are not written to the table and are probably hanging
somewhere in a buffer. How can I save data to the table so it can be
used right away without closing the application?
Tks

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: InDeSkize | last post by:
Hello my programming Super Heroes. I think this one is a no brainer, me being the one with no brain. I have a form that is used for data entry. The goal is to have an unbound form that only...
7
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and...
4
by: Robert | last post by:
Have main form with an unbound subform1 which is used for data entry. Subform1 has a nested continuous unbound subform (subform2) which is used to enter multiple records related to the record being...
5
by: ApexData | last post by:
Hello I'm trying to save data to an Existing Record in a single table. These fields are not on my Form. It is not saving the data to the record ??? Dim db As DAO.Database Dim rs As...
4
by: sparks | last post by:
I am trying to fix a database that someone did about 4 yrs ago in access97. The main table just contains demographics and is on the main form of the database. It has a subform on a tab that...
2
by: PW | last post by:
Hi, What the heck is that supposed to mean? I am getting this error on a "Me.Requery" line in a subroutine on a form, but only when I select something from a combo/dropdown box. The *exact*...
1
by: google | last post by:
I have a form with several subforms. Users enter the data, then on the parent there is a command button that runs code to generate a .pdf document from a report based on the data they are working...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
3
by: MGC | last post by:
I am using MS Access 97. I am trying create a log of record set additions to a table containing product inventory locations. Would like to add the date and time stamp to the just-saved data in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.