473,783 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make a datasheet work like a spreadsheet?

I'd like to be able to do in-cell editing of a datasheet and have other fields
automatically update. I know... the easy answer is to use Excel, but I'm
wondering if I can pull this off in Access since all my data is in tables.

For example, I have a SubForm Datasheet with these text boxes:

txtAccountNumbe r
txtCurrentBalan ce
txtPendingTrans actions
txtLedgerBalanc e
The RecordSource of the Datasheet is a Table - tblAccounts - which has all the
Account Numbers. I have a query that totals up all the Pending Transactions,
and txtCurrentBalan ce is bound to a field in tblAccounts.

If I put this in txtLedgerBalanc e:

=DLookUp("Total Pending","qryBu dgetPendingTota ls","Payment_ID =Forms!frmBudge t!frm
Budget_AcctsDat asheet.Form!txt AccountNumber")

txtLedgerBalanc e is calculated for each row in the Datasheet, and updates after
I make a change in txtCurrentBalla nce

But how to total all txtLedgerBalanc e text boxes? The constraints as I see
them are this:

* I have to use a table as a record source for the datasheet so I can "in-cell
edit"
* I have to use DLookup in txtLedgerBalanc e to get a spreadsheet effect that
calculates each row of the datasheet

Is there a better way to go about this? Should I do the calculations in queries
or VBA code in the Form's module? Both?

any pointers welcome...
Nov 12 '05 #1
2 3063
deko wrote:
I'd like to be able to do in-cell editing of a datasheet and have other fields
automatically update. I know... the easy answer is to use Excel, but I'm
wondering if I can pull this off in Access since all my data is in tables.

Create a query as source for your datasheet, and include the
calculations in that query. Maybe you'll have to do some manual
instigation when you edit fields (like me.recalc or so)

--
Bas Cost Budde
http://www.heuveltop.nl/BasCB

Nov 12 '05 #2
> Create a query as source for your datasheet, and include the
calculations in that query. Maybe you'll have to do some manual
instigation when you edit fields (like me.recalc or so)


The Recalc method is the way to go - thanks!
Nov 12 '05 #3

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

Similar topics

3
6424
by: Keith Wilby | last post by:
I have a form which allows both form and datasheet views. My question is, is it possible to control the field (column) names in datasheet view? What happens at the moment is that the name is taken from a control's label if there is one, and if not, the control's name is used. This is confusing for my users so I'd like to be able to use more sensible names in datasheet view. Is this possible? Many thanks. Keith.
4
9416
by: Terry | last post by:
I have created a Main Switchboard in Access 2000 and it has a button which opens a Form. I have set the form Properties Default View to Datasheet and this always opens in datasheet view. When I open the Form from the Main Switchboard it always opens in form view. Can this be changed so that it always opens in Datasheet View? Terry
2
2406
by: Paul | last post by:
I have a datahsheet form. It is used as a sub-form within a main form. When moving within the datasheet sub-form the cursor goes from one field to the next (left to right if pressing the right arrow key and vica versa). Is it possible to make it work like a list box? What I mean is that only rows are highlighted, not individual fields. You can do this in VB6 with a MSFlexGrid.
5
1621
by: RR | last post by:
Does everyone who posts here get spammed by PC Datasheet, or is it just a "lucky few"? I've asked two questions in the last year, and gotten spammed by him both times. Yes yes I know, dont used a correct email address. Sad part is I am not getting spam for anyone except from the "access professional". Or maybe I misunderstood what this news group was all about..........
2
1056
by: bluewind44 | last post by:
Is there a way to import datasheet to ASP.NET project? I saw it but I can't figure out how to do it. Is there any one can help me out? Thanks
1
6731
by: icenemesis | last post by:
I have a form that searches dynamically based on what criteria the user enters. The resulting query populates a subform in datasheet view. If I wanted to have a button that would export the results of the query that is the source for that datasheet form to excel. How would I go about doing that through VBA? Thanks in advance.
2
1401
by: PekinSOFT | last post by:
Hey all, I'm working through the book "GUI Programming with Qt3" and have worked my way through Chapter 4, creating a small spreadsheet application. I'm finally to a point where I can compile the program and see how it looks, but I keep get some cryptic error that I don't understand. Maybe you all can help me out here. I've created many files and have all of them included properly in my implementation files, so I know the problem is...
6
2141
by: =?Utf-8?B?S3VuIE5pdQ==?= | last post by:
Dear all, I'm trying to use oledb to get the content of an excel file. Now I can use oledb to get the content of a datasheet. But I should know the name of the datasheet in advance. How can I use oledb to query the names of all the spreadsheets in the excel file? Thanks in advance for any hints and reply.
2
6426
by: LucasLondon | last post by:
Hi, I'm trying to use VBA to extract underlying data from charts in powerpoint to excel, i.e from the underlying powerpoint datasheet that feeds the chart. I've found the macro below on the net. It copies the data in each chart/datasheet and slide in powerpoint but I'm struggling with the bit to get the data into excel. Below it I've tried incoporating some code to paste into excel but it does not seem to work. Hope someone can...
0
9480
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,...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10083
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
9946
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...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.