473,586 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1882
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.c om> wrote in message
news:40******** ******@nospam.c om...
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
1846
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 enters the record when you hit the "Save Record" button. I've been using a form that enters right into the table, and I'm running into too many...
7
2276
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 in summary form, in hopes that someone might have an idea about what's going on. I am using a bound form which is losing data a significant...
4
2708
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 entered in subform1. Am using DAO method to save the records entered into subform1 & 2 into the underlying tables (table1 & table2). Record...
5
1239
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 DAO.Recordset
4
2206
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 contains the other information. it is set 1 to 1 in the relationships. simplify if I can
2
14247
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* same code is run when I do other things (like press the Save button or tab through that control). I have searched every control, involved queries...
1
3230
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 with. If a user enters data in a subform, then directly clicks the command button on the parent form, the data in the subform is not included in...
4
12426
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 this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
3
1435
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 main table and record the transaction in a new table. I am trying to use a subform from in the main data entry form. The subform displays the...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.