473,395 Members | 1,341 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,395 software developers and data experts.

requery question

ken
Hi,
In my after_insert event on a form I add additional records to the
table. The problem I'm running into is that I need for those records to
show up after the after_insert event ends. If I requery the form during
but at the end of after_insert I don't see the recently added
records(using VBA the INSERT statement). However if I use a refresh
button(onclick me.requery) then I see the records. But I need to see
the records at the end of after_insert or slightly after...
any suggestions?

Nov 13 '05 #1
4 1364
ken
Upon an insert of a record is there any event after the "after_insert"?
I've been looking but there does not seem to be one...

Nov 13 '05 #2
well, obviously you must figure out a way to do the Me.Requery after
you've inserted the records.
In the afterupdate, just make sure the requery follows the record
adding code.
Or maybe you can do record adding in the beforeupdate event, then
requery on afterupdate.

Nov 13 '05 #3
ken
Me.requery does not work in after_insert nor in after_update. I believe
that's because the record that I'm inserting or updating has not been
saved? So I have to save the record(pass the after_update or
after_insert events) then I could requery, but I don't know how to do
that.

Nov 13 '05 #4
These events are explained in access help. Place the cursor on any of these
events on your form in design view and press F1

John
"ken" <ge****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi,
In my after_insert event on a form I add additional records to the
table. The problem I'm running into is that I need for those records to
show up after the after_insert event ends. If I requery the form during
but at the end of after_insert I don't see the recently added
records(using VBA the INSERT statement). However if I use a refresh
button(onclick me.requery) then I see the records. But I need to see
the records at the end of after_insert or slightly after...
any suggestions?

Nov 13 '05 #5

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

Similar topics

5
by: Scott | last post by:
I have created a form that has a few combo boxes on it. On the form I have ComboBoxA which selects data from a region, and ComboBoxB that selects individual locations within a selected region. I...
6
by: Dos Lil | last post by:
I have a comobox in the main form which has a query attached to it to list the employee numbers.I have written this code to requry the control in the control's after update event Private Sub...
1
by: M Wells | last post by:
Hi All, I am developing an Access 2003 project application with the back end in SQL Server 2003. I have a master form that tracks projects, and several subforms on it that track various...
4
by: deko | last post by:
I'm a little nervous about slamming my database with a dozen Update queries in a loop that all modify RecordSources of open forms. Will the use of DoEvents and/or a Sleep function ameliorate any...
20
by: MS | last post by:
Access 97 I want to requery the data being displayed on a form, then I want to return to the record I was in. Why doesn't this code work? Private Sub CmdRefsh_Click()
7
by: SBC News Groups | last post by:
I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line: DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,...
11
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my...
4
theaybaras
by: theaybaras | last post by:
Hi All... I've read both of the requery discussions I could find... Refresh ComboBox After Adding New Values via a Seperate Form and refresh a form but am not quite able to get this to apply...
8
by: jadeverell | last post by:
Hi, I have a form which contains some dates and some calculated fields based on these dates e.g. Days until contract expires (difference between today and contract end date) etc....I also have an...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...

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.