473,833 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1398
ken
Upon an insert of a record is there any event after the "after_inse rt"?
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.c om> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.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
39632
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 need to figure out the correct way to Requery ComboBoxA after I have updated it. I searched the archive for this list and found a simple solution: put Me.Requery in the AfterUpdate event of ComboBoxA. However, when I try this I get an error...
6
2115
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 CBOEmpNo_AfterUpdate() Me!.Requery End Sub but still I am getting error
1
2997
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 aspects of the project. On the masterform I have two unbound listboxes that I populate with information regarding the current record in one of the subforms.
4
6927
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 risk involved in doing this? Should I include a Requery in the loop after executing each query? For example: For each varQry in Array("qryDeleteOldTransactions", _ "qryDeleteClient Acct", etc., etc.) db.Execute varQry
20
10691
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
4103
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, , acMenuVer70 Once this line executes, I have a sub form that I want to "refresh" because the newly saved information should now display on the sub form. I am trying to do this with this line: Forms!.Requery
11
7184
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 mind I am wonder if this is causing my problem, but I don’t want to go through the work to convert to DAO unless I know it is truly in my best interest.) I am having problems getting a requery to show up consistently on a couple of forms. I have...
4
2074
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 to my database. I have a table/form called Author_Info where information about authors is entered. The fields of interest here are: Author_Last Author_First
8
2016
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 update button that re-calculates the derived fields if the dates are manually changed. The update button has the following macro behind it: SetWarnings Requery OpenQuery OpenQuery (update queries)
0
9796
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10543
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10213
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7753
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3078
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.