473,320 Members | 2,088 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.

Select a record from a report OnClick using vba

3
What I am trying to accomplish is that the user can click a value in a report and and edit the original data in the table. Right now I am up to the point where I am storing the field lable and field value in public variables.
When the user clicks a value it launches a form with a txt box to enter the replacing data. I tried to build a modify querry that pulls the data from the txt box to replace the original value, but I have no way of specifying the record through the query critera.
Sep 6 '11 #1
10 3300
patjones
931 Expert 512MB
A couple of questions, to clarify your situation.

First, what does your report consist of (e.g. list box, datasheet subform, etc.) that you are able to click on an entry and have it open your edit form?

Second, when the edit form opens with the data for that particular entry, is the existing data already being populated correctly?

Pat
Sep 6 '11 #2
NeoPa
32,556 Expert Mod 16PB
May I just ask why you would feel the need to try to do this within a Report when Forms are designed to handle that type of activity?
Sep 7 '11 #3
patjones
931 Expert 512MB
I've made an assumption here that by 'report' the OP means something within a form that allows the user to view multiple records, such as a list box control. Hopefully we can get some clarification on that point.
Sep 7 '11 #4
NeoPa
32,556 Expert Mod 16PB
That would be an unfortunate choice of term if that were the case Pat (as Report is a valid term for something else in Access), but that's no guarantee you're wrong of course.
Sep 7 '11 #5
Jon B
3
[IMG]L:\screen1[/IMG]
This is what I'm trying to do. The report is simply a display of a query, values are txtboxes. My employer would like to be able to do this even though I agree, forms would be the better way.
Sep 8 '11 #6
NeoPa
32,556 Expert Mod 16PB
Pictures must be uploaded to be shown. A reference to your local L:\ drive is not going to work I'm afraid. See point #9 of Attach Database (or other work).

Reports are not objects that can be used to manipulate data as a form might be. Things may have changed with reports somewhat in later versions, but on 2003 there are no events available for TextBox controls on a report. 2007 and later may well support clicking events, but I'd be very surprised if they supported changing of data therein. Assuming then, that a click can be detected in such later versions, we are still looking at modifying the record using a pop-up form triggered by said event. There are likely to be all sorts of locking issues though, as the record is already selected on the report.

I'm not going to comment on your boss's thinking process, but this seems like far too much work even to look into, just for the pleasure of trying to do things the way they weren't designed to be done.

PS. I'm going to remove your last post as irrelevant to the thread. When you manage to attach the picture I'll help to make it show up properly in the thread if you need it.
Sep 8 '11 #7
Jon B
3
Thanks for the feedback, I guess I'll just scrap the whole thing and just make them use forms. the lock out issues from the data already being open in a report didn't occur to me, it probably wont work then. But, yes, you can write VBA for just about any object in a report with access 2007-2010.
Sep 8 '11 #8
NeoPa
32,556 Expert Mod 16PB
Jon B:
But, yes, you can write VBA for just about any object in a report with access 2007-2010.
I suspect the range of events supported for these controls are less extensive than for those same controls on a form though. I would expect those for data handling to be missing for instance.
Sep 8 '11 #9
patjones
931 Expert 512MB
The event list for a report is considerably shorter than for a form, but there is an On Click event available. It has never occurred to me to use that event in a report context, nor am I sure that it would be good design practice, but I guess if someone feels they really need it - there it is!
Sep 9 '11 #10
NeoPa
32,556 Expert Mod 16PB
ZeppHead80:
nor am I sure that it would be good design practice
I'm with Pat on this one. MS are trying to acceed to all requests, even when those requests don't make much sense. As far as they're concerned, anything that encourages new people to start working with the product is good. The fact that they don't make sense, and only lead to those same inexperienced developers getting into trouble shortly afterwards, seems not to be their concern. Access 2007 is a classic illustration of this concept.
Sep 9 '11 #11

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

Similar topics

0
by: Ray | last post by:
Hi all, I would like to ask how to know whether a user has printed a report while using crystalreport viewer. Thanks a lot, Ray
1
by: ashish ranjan | last post by:
Hi there , I m in great need to know: How to select row from grid and update record in database using Ajax. u can use c#,.net and java script. Thanks in advance, Ashish Ranjan
1
by: sathyan8294 | last post by:
what is vb.net code for delete a record in datagrid using vb.net windows application
2
by: Shivajirp | last post by:
I have table in which Shift no, Start time. End time. if start time of shift is 6pm and end time of shift is 6 am then I want to select record between start time and end time.I need query to selct...
0
by: alexalok | last post by:
Hi , I developing an application VS dotnet 2003 using C#. I want to use crystal report without using DSN,so that i can change Database on run time. if anybody can help me. thanx.
0
by: praka88 | last post by:
I am a student and I need to develop a project using vb6.0 as front end and oracle as back end . how to solve a fetch the previous and last record in oracle using v b6.0
0
by: ixcrazee | last post by:
Hi, I have an old product which was developed using classic ASP and Crystal Report 10. Currently it bring up report by using the following method, is there any way that we can bring up the Crystal...
1
by: newphpcoder | last post by:
Good day! I upgrade my version of mysql from mysql 4.1.10 to mysql 5.0.15. Now I used phpmyadmin to access my database using XAMPP. Now, I need to create a report generation and I have no idea how I...
4
by: LHodgdon | last post by:
Hi, Has anyone else had a record offset problem using the ContinuousFormsCurrentRow sample database (2007 Access.) The rows seem to be off by one. Would really appreciate the help! Thanks in...
1
by: Waganjika | last post by:
How can I code preview a report designed using c# crystal report? The Application builds successfully, and all other functions works alright but when I select from menu to preview a report,...
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...
0
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
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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: 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.