User Profile
Collapse
-
Have you tried debugging from the VBA editor? If there is anything wrong with the Comapct/Repair, it should show up when you debug/compile. -
Hi Petrol,
I don’t know how this may or may not be affecting things, but with your OpenForm commands, it appears that your Form names include a colon, which I always thought was a restricted character for Form names. It would be odd that MS Access would allow your names to actually have a colon, and then cause problems when using those names.
This is just a hunch, but that may be a starting point.
Hope that...Leave a comment:
-
Petrol,
This label that you want to show or not show must be a text box. Set its height to 0” and then set the CanGrow to Yes. This should adjust its height accordingly without messing with any of the OnFormat events of that section of the report.
Hope that hepps!!!!!Leave a comment:
-
Delete lines 4-6 from my code it is unnecessary for this to work.Leave a comment:
-
twinnyfo replied to Want to create VBA to create a button which will go to the relevant line in a linked database for a clientin AccessTrue, true, NeoPa! Faulty assumption on my part, but hopefully the suggestion points OP in the right direction.
I should have learned my lessons by now—I’m just so accustomed to numerical values. Here’s the text version:
...Code:Dim strWhere As String strWhere = "[FinCoaching Enrollment File 2].Client_Name = '" & Me.Client_Name & "'" Call DoCmd.OpenForm( _
Leave a comment:
-
twinnyfo replied to Want to create VBA to create a button which will go to the relevant line in a linked database for a clientin AccessI would do this:
This assumes Client_Name (with only one underscore) is a Field in the referenced Table and a field available...Code:Dim strWhere As String strWhere = "[FinCoaching Enrollment File 2].Client_Name = " & Me.Client_Name Call DoCmd.OpenForm( _ FormName:="Clients with matches Full Report", _ View:=acFormsDS, _ WhereCondition:=strWhere)Leave a comment:
-
SC,
Also as a side note, concerning Report View (and layout View), I have all my reports default view set as "Print Preview" and I have the "Allow Report View" and "Allow Layout View" set to "No." This always ensures that when you are designing and testing your reports that "what you see is what you get." There can be some useful features of Layout View, but I prefer to make all my...Leave a comment:
-
enilc,
Welcome to Bytes!
First, in order for such code to work, it would need to be placed in the OnFormat Event of the Report's section that contains the sub-report.
However, a much more easier way to do this is to have the height of the subreport set to 0, and have the subreport's CanGrow property set to yes. Thus, when there are records, the subreport will expand to show them; when there are no records,...Last edited by twinnyfo; Apr 29 '21, 04:49 PM.Leave a comment:
-
Frank,
First, welcome to Bytes!
Second, instead of posting a link to an image, please upload an image using the "Advanced" button when you post something.
Third, I think I might kinda understand what you are talking about, but I am not quite sure. Let me see if this describes it properly: You have a form with a list box on it. When you first open the form, you want the list box to be empty, with...Leave a comment:
-
NeoPa,
The easy answer to the question as to why FileCopy won't work is that it doesn't work with files that are currently open/locked.
I am not smart enough to know why not, but, as you also agree and point out, fso.CopyFile does. Again, I can't explain why there is a difference, but there is. If the OP wants more than that, I cannot give it....Leave a comment:
-
Friends,
I accomplish this using a FileSystemObjec t as IslaDogs describes. It can force a copy, even if the file is in use. I have never experienced any issues.Leave a comment:
-
In general, you would need to use VBA to use the Table object and cycle through all the fields, assigning that list to the second combo box. The challenge is getting the list of fields into a recordset that is usable by the combo box. The only way I know how to do that is by using an ADODB recordset.
But, other than this advice, I am not going to build this for you when you have not put forth any effort to work through this yourself...Leave a comment:
-
NeoPa,
Ya know, I have been thinking about how one would accomplish this for weeks, then I decided to just submit a question--wrote out my thoughts and posted. Then I walked away for about 30 minutes and while I was away, I thought to myself, "Self, wouldn't one just declare a Public Sub in the Person Class Module?"
So, I came back and tried it, using my example, and it kind of worked, but I could not figure...Leave a comment:
-
Using a Class Module to Execute Code
Hello Friends,
'Tis me again, with what might possibly be a very simple question, but one I just don't know where to start searching. I will begin with an example that should make sense to everyone, then describe what I am trying to do.
First, a common example. Let us say we are working with an object. An object has properties, some of which can be changed, and it also has methods which do things. For example, a For... -
IslaDogs,
I did a poor job of properly delineating my antecedents. I fixed the spook-link. THAT has been fixed. That old age thing--we're still working on it.....
;-)Leave a comment:
-
@NoePa:
DUDE! Cover, totally blown! I meant to remove that before I posted it. Did someone say something about old age? That has been fixed.....
@SwissProgramme r:
Say what? If I could follow the first half of your post, I would probably agree with you--you appear much smarter than I. However, the bloat only occurs during the relink of an already compiled FE. Thus, I am not re-compiling, let alone re-re-re-compiling...Leave a comment:
-
A Compact and Repair on close did return the App to its original size, and I have great confidence that there will no be problems with this action.
However, because I trust NeoPa's years of experience, and because my FE is rather tiny, there is really neither harm nor risk in copying the FE everytime anyone uses it. In the grander scheme of things, this is probably the "best" way, and those who know me know that I would much...Last edited by twinnyfo; Mar 24 '21, 10:34 AM.Leave a comment:
-
I will try the compact on close method first. If not, I'll just copy the FE each time.
Thanks for the hepp!Leave a comment:
-
There are three MS Access .accdb files, and there are also several raw text and .tsv files. I wonder if it has to do with the re-linking of text files?
Just a guess.....
Either way, it "works," but it's still annoying.Leave a comment:
-
Joe,
Looks like you have some issues with periods and spaces (and a typo in the second SQL string). Also, I also recommend using variables for your SQL strings. This allows you to troubleshoot if you have to:
...Code:Dim strOrder As String Dim strSQL As String Dim dbs As Database strOrder = Me.TxtOrderNo MsgBox strOrder, vbOKOnly strSQL = _ "DELETE [DBA_inv_payment].*Last edited by twinnyfo; Mar 18 '21, 07:40 PM. Reason: realized variable was a string, so updated SQL.Leave a comment:
No activity results to display
Show More
Leave a comment: