473,320 Members | 1,957 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.

Calculate a SUM after Combo box SelectedIndexChanged

I am using VB 2008 Express to connect to an Access 2007 database. I have a combo box called SelectYearMonth that is populated by the database. In the Access report VBA, I used the AfterUpdate() event to calculate a sum. I need to know how to do the same operation in VB 2008 Express.

When I made a report in Access using VBA I coded my calculation as:
Expand|Select|Wrap|Line Numbers
  1. Me.ExactReprintTextbox = DSum("Pages", "HBELP_FINAL_Q", "YEARMONTH = " & [SelectYearMonth] & " AND JOBTYPE = 'E'")
While this works great with Access VBA, this syntax does not work in VB 2008 Express.

How do I code this in VB 2008 Express?

Any help is greatly appreciated!

-Diana
Nov 15 '10 #1
0 1136

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

Similar topics

3
by: sandman | last post by:
I've got a combo box that has an event handler set for SelectedIndexChanged event. The problem is that it's firing at startup when I load data from the Form_OnLoad event. I tried setting a flag...
1
by: Robert Schuldenfrei | last post by:
Dear NG, I have successfully bound a combo box to a table when only one column was involved. I am trying to present the user with the primary key to an item-location table. The primary key...
3
by: Craig G | last post by:
i've emailed metabuilders themselves but was just wondering has anybody else ever had this problem? I am populating the combobox using a SQL2000 table. The combobox populates successfully with the...
3
by: Tony Dong | last post by:
Hi there I have three comboBoxs I need the first comboBox selected and fill the second comboBox, after second comboBox selected, it will fill the last comboBox, When I use selectedIndex change...
7
by: Ausclad | last post by:
Ok, ill try again..... It seems fairly simple. I have two combo boxes in a datagrid. The datagrid is bound to a a table in a dataset. The two combo boxes are bound to a single data table...
4
by: dmac | last post by:
Below is some really simple code - its just a trivial class used to populate a combo box from which I want to pull out one of the properties of the selected object. I am just curious to know why -...
0
by: BillCo | last post by:
I'm a C# Newbie, so if I've missed the obvious here go easy!!! I have a form opened from a MDI parent. The form has a data bound combo box, with a SelectedIndexChanged event (fills a list view...
9
by: bdominiq | last post by:
I have three diferent combo boxs I want to sum the second column of each combo box after update. I tried to sum the selection on a different text box, but it row them up on the text box. How can you...
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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)...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.