** Mod ** This post was split away from Access 2003/ VBA form filter problem as it's a new question.
NeoPa, I've come up against the same problem again, though this time I think a user was using CTL S each time they viewed a filtered form to "save the result" and thus created a problem it took some time to find. (the form appeared blank on several occasions when there was data to show because of the filter)
I would...
User Profile
Collapse
-
How do I Stop Users Saving Over a Form Design
Last edited by NeoPa; Mar 10 '12, 01:35 PM. -
hi NeoPa, I understood what you were saying in #2 and decided not to proceed with VBA in the report load control.
Rather, it seemed easier to filter the contents of the subform using a query with a funtion in the criteria (WHERE). So, I removed the VBA from the subform, added some VBA in a public function and a reference to this function in the query. When the query runs, a value is passed from the report and I decide whether or not... -
thanks- yes, that is certainly what I have observed.
Looking at using a function in the query linked to the subform as a way of controlling output.Leave a comment:
-
using functions as criteria in a query
I have created a query in Access 2003 as follows:
Code:WHERE (((AccDS1check) Is Not Null) AND ((AccFabDate)=GetFDate()) AND ((AccRelacion)=21))
Code:Public Function GetFabDate () As String GetFabDate = ">#01/01/1980# and < #01/01/2011#” End Function
-
I guess the only way to do this is create two queries, one with all the accessories for a product and another which accessories for a product filtered by date.
Does anyone know of a more elegant solution?Leave a comment:
-
Thank you for taking the time to record this. My reports now have messages when there is no data in the subform!Leave a comment:
-
hi, thanks for your reply.
Could you elaborate? I'm using A2003 and do not see a detail event control in the report properties box.
Also, each record is being printed on a new page, and each page has a new set of subdata. Will this work? Sorry, I'm not a very advanced access user.Leave a comment:
-
Filtering subforms in reports
I have two databases, one with products and another with accessories and a query which relates products and accessories. I created a simple report which lists the product fields and has two subforms. The first subform simply lists all the accessories. The second subform needs to list a subset of accessories so I wrote a few lines in VBA which is called on the LOAD control. The VBA simply gets some criteria from another table, makes some decisions... -
Replacing Empty Subforms on Reports
Hi, I a several subforms in a report and for some records the subforms do not return any data. When this happens, I would like to display a message as at present the area normally occupied by the subform is simply blank. Can anyone help me? Thanks in advance. -
-
VBA/ Replacing data in a table
I have a fairly long table with several fields and need to replace specific values in a field in a subroutine. I’m using a simple SQL statement at present:
Code:DoCmd.RunSQL ("UPDATE table SET field = replace(field, '" & fromtxt & "', '" & totxt & "')")
-
thank you. I didn't know about "CurrentProject .FullName" and Format with Now is much simpler. The Time part got hacked on late last night..Leave a comment:
-
Auto database backup/ copying a file in use
I came up against the problem of how to backup an open database yesterday. I read various threads here and on other sites on how to do this but none gave a working solution. So here is mine- for comment. Any improvements would be welcome.
In my case, the user is in a restricted interface and so cannot use the backup menu option. This has been tested on Access 2003:
Code:Public Sub DBbackup() Dim DestPath
-
Report lacks left, right and top window border
I have a report in Access 2003 which consists of a header with two fields and a subform pasted into the centre.
When I open this form, it always displays in Print Preview and I cannot find an setting for default view. I would prefer it showed in Layout Preview. Can anyone help with this setting?
Also in Print Preview, the left, right and top borders present in all Windows do now show. If you zoom in, the right scroll... -
-
ADezii, have you done something like this? Can you share any VBA code?
The db is password protected but the problem is that there is at least one easy to use programme that can unlock an access DB. I like the idea of some VBA code to stop the DB from opening on another machine.Leave a comment:
-
Unfortunately, there is no backend- the database is installed on the club's only PC.Leave a comment:
-
Security- disabling DB copies
Hi, I have an Access 2003 DB that will be installed on XP home in a local club. Several members will be able to use this DB and I am concerned that someone might one day take a copy of the members data home with them on a pendrive.
I can't stop file copying at the OS level, so I am thinking of scattering a few VBA lines to read hidden files in the system area and generate errors when the DB is run on another machine. I know its a game... -
Problem solved by setting- ForceNewPage=af ter section
CanGrow=no
CanShrink=no
Leave a comment:
- ForceNewPage=af ter section
-
Subform/ subreport printing
I have a report which contains only one object, a form defined and used elsewhere. At present, in the report view I see a continuous list of forms, one for each DB entry whereas I would like one form per page.
I tried inserting page break controls in design view but they do not seem to be respected. I also set ForceNewPage but this also has no effect.
Can anyone pls help?
No activity results to display
Show More
Leave a comment: