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

On Append Table Event

171 100+
I have got a form which displays Chq number's and it is crucial that they are always being displayed as the latest numbers. So I would like a query that would update the query showing the Max Chq Number everytime a record is added to the Chq's tables (tblChq)

So something like

Expand|Select|Wrap|Line Numbers
  1. Private Sub Tables!tblChq_Append()
  2. 'Update the Listbox containing the Max Chq Number in the table tblChq
  3. me.lstChqNumber.requery
  4. End Sub
Thanking You
Mar 11 '09 #1
8 2187
NeoPa
32,556 Expert Mod 16PB
I'm confused.

This doesn't seem to contain a question as such. There are some statements that all seem to show you already have what you need. I'm at a loss to see where you need the help :S
Mar 12 '09 #2
NeoPa
32,556 Expert Mod 16PB
Unless maybe you have the whole aggregate thing confused.

You know that such a number would never be maintained as a stored value yes? That value would always be determined, when needed, via some form of query or function.

The Aggregate (or Domain Aggregate for use within VBA dierectly) functions work with grouped records, and consist, among others, of Sum(), Count() and Max() functions. The Domain Aggregate equivalents are DSum(), DCount() and DMax() (etc. I'm sure you get the picture).

PS. If this is confusing to you (Why on Earth would anyone do it such a stupid way and not simply store the values?), then please read the very interesting (and educational) article - Normalisation and Table structures.
Mar 12 '09 #3
iheartvba
171 100+
Actually I was asking how to run code on an 'On Append Table Event'. So If a Table is appended the code runs.
Mar 29 '09 #4
Stewart Ross
2,545 Expert Mod 2GB
Hi iheartvba. There are no table-level events exposed through VBA. The nearest to them are the record-level events available in forms - the On Current, Before Update, and After Update events in particular. In your question you ask how you can access the table event concerned - well, only through a form bound to that table, and only if the table is actually updated through use of the form.

If what you are after is some kind of notification that the cheque numbers have changed you will need to build this yourself. If you are seeking to have the maximum cheque number displayed then all you need is an unbound text box that is regularly requeried, displaying the maximum cheque number value using DMax or the like (as NeoPa was alluding to).

-Stewart
Mar 30 '09 #5
iheartvba
171 100+
Hi Stewart,
That is what I have done, I have a button which provides the latest Chq number. I was just a bit curious about the on Append Table event, because if 5 people are using the back end it doesn't matter how many events trigger you have in a form, if another user has done the append or update, then no even will be triggered in your Form. Anyways... I can live with that.
Mar 30 '09 #6
NeoPa
32,556 Expert Mod 16PB
Astute.

There is always the possibility that a displayed value will be out of date by the time the value is used. This is why it is not a good idea to display the value generally.

An append trigger would certainly help (Not available in Access unfortunartely). This would change the underlying concept to interrupt based rather than poll based. Required to make such a process 100% reliable in a multi-process environment.
Mar 31 '09 #7
iheartvba
171 100+
Well my solution is for Access to Allocate the Chq Number and then whatever the user gets, thats what they use. I.E. the Chq is written after it is entered into access. And Man access doesn't have everything, but it is so cool, it can do so much even taking into account it's limitations.

Now for a short Rant:I hear so many people say Microsoft makes horrible programs that crash all the time... well they do crash, but what other programs are out there that a non-programmer can use with so many features (and that don't crash)? Don't say open office, it doesn't even come near office.
Apr 1 '09 #8
NeoPa
32,556 Expert Mod 16PB
Personally, I have a lot of respect for all those involved in the project, and the project itself too if truth be told. Unfortunately, for me at least, and presumably a fair few others, the programmability factor was nil when I last looked. There must be quite a few users who never use that side of things, but for those of us that do, Open Office is not really a viable alternative.

Considering it's free to use without payment though, I'm not inclined to be critical (not that I'm suggesting you were of course).
Apr 1 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John | last post by:
Hi - I am trying to perform a simple append query, with no luck. I have a table (MktPrices) that has the following fields: BondID, PriceDate, Price. The objective is to allow the user to input a...
2
by: Paul Wagstaff | last post by:
Hi there I have 2 tables: tblAccuracy & tblClearance Users add new records to tblAccuracy using frmRegister. Under specific conditions I need to append the current record from frmRegister into...
4
by: Clint Stowers | last post by:
Running Ak2 Daily there is a report that is run where a summation of the detail records is placed in the footer. Simple standard operation. What I would like to do at the time the report is...
2
by: Steve B | last post by:
I am trying to design a Call Log Detail form that will allow users, in a multi-user environment, to select various data/records, not necessarily in sequential order, from a subform that will, when...
6
by: dd_bdlm | last post by:
Hi all I have a database that stores customer records and their associated insurance details. I need to be able to archive any changes made to that record. Currently the user selects 'record...
1
by: travismorien | last post by:
I have four tables of different "entities". One table contains information for "people", one for "trusts", one for "companies" and one for "self managed super funds". Each type of entity has an...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
1
by: infp76 | last post by:
I'm creating a simple form in Access, and I've added a couple of drop-down calendars, but I don't know how to have the user-selected date append to the table with the rest of the form data. I'm...
4
by: franc sutherland | last post by:
Hello, I am using Access 2003. I am having trouble trapping the "can't append all the records in the append query" error message when appending data to a query from a table which is linked to...
9
by: dombrost | last post by:
Hi all. I am total newbie to Access so any help is greatly appreciated. I am creating a simple database in Access 2003 that captures details of an operation event. I created a form for the user...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.