PC Review


Reply
Thread Tools Rate Thread

When does data entered in form appear in underlying table?

 
 
Chrisso
Guest
Posts: n/a
 
      23rd Jan 2007
Hi All

I have a form that sits straight on top of a table. I enter new records
by hitting the ">*" button for a new record and then filling out the
fields.

Can anyone tell me when this record will appear in the actual table?

It seems to appear after the form is closed but I want to run an append
query on the newly added record before I close down the form but at
this stage the info I have entered does not appear in the underlying
table.

Can I make some sort of commit call to force this new record into the
table so that I can then run my query to append that data to another
table? Or is this bad practice?

Chrisso

 
Reply With Quote
 
 
 
 
strive4peace
Guest
Posts: n/a
 
      23rd Jan 2007
Hi Chrisso,

the record is written automatically when you move off it -- to another
record or close the form.

You can force the record to save to the disk by clicking on the pencil
icon that appears in the record selector area to the left as you start
typing.

You can also use code to see if a record needs to be saved and, if so, do it

'~~~~~
'save record if changes have been made
If me.Dirty Then Me.Dirty = false
'~~~~~

If you are going to run an Append query in code, make sure you do this
afterward:

currentdb.tabledefs.refresh
DoEvents

so that other processes/users see the changes

~~~

btw, please do not post the same question into different newsgroups,
this question is also posted in microsoft.public.forms


Warm Regards,
Crystal
*
(: have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



Chrisso wrote:
> Hi All
>
> I have a form that sits straight on top of a table. I enter new records
> by hitting the ">*" button for a new record and then filling out the
> fields.
>
> Can anyone tell me when this record will appear in the actual table?
>
> It seems to appear after the form is closed but I want to run an append
> query on the newly added record before I close down the form but at
> this stage the info I have entered does not appear in the underlying
> table.
>
> Can I make some sort of commit call to force this new record into the
> table so that I can then run my query to append that data to another
> table? Or is this bad practice?
>
> Chrisso
>

 
Reply With Quote
 
Tony Toews
Guest
Posts: n/a
 
      23rd Jan 2007
strive4peace <(E-Mail Removed)> wrote:

>the record is written automatically when you move off it -- to another
>record or close the form.


Actually the record is not always saved when you close the form. If
there are field level constraints, such as required field, then
closing the form using the standard command button will not display
that error message and not save the record.

Thus I would certainly agree with using other methods such as you
state to ensure either the record is saved or that any messages which
stop the record from being saved are displayed.

>If you are going to run an Append query in code, make sure you do this
>afterward:
>
>currentdb.tabledefs.refresh
>DoEvents
>
>so that other processes/users see the changes


Did you mean Append query or MakeTable query?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving form data to underlying table =?Utf-8?B?RGF2ZSBC?= Microsoft Access Forms 1 13th Apr 2007 11:04 PM
When does a record entered thru form appear in underlying table. Chrisso Microsoft Access Forms 4 26th Jan 2007 12:43 AM
form can't update after its underlying query's underlying table are splited tang.yifan@gmail.com Microsoft Access Forms 0 21st Sep 2006 03:15 PM
Data from synchronized list box on a form not entered into table bound to the form Phil F Microsoft Access 3 7th Sep 2006 04:44 AM
Data from underlying table not visible in form? =?Utf-8?B?UGF0IERvb2xz?= Microsoft Access Forms 1 6th Jan 2005 04:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:56 PM.