I did a few things. I took the default sql and made it into a SQL view, which runs way faster. That turned my filter code to the following:
Private Sub Filters()
Dim fSQL As String
fSQL = "SELECT * FROM vw_MyView WHERE 1 = 1 "
If Nz(Me.cboFilterTo.Value, 0) <> 0 Then...
Well, I did that and it causes the entire form to take an entire minute to load. I have tried other ways, like taking the dynamic SQL statement and doing a recordsset.fields(0) count tally, but that is slow and doesn't seem to get the right count. Still looking for options.
misscrf
It is never...
The problem is that the SQL is not 1 table. It's about 6 tables all joined together. I was thinking of making a 2nd sql, that would be the exact same, but instead of selecting the fields, it would be a select count. I'll try that and post back.
misscrf
It is never too late to become what you...
Instead of using the form filter and filtering the recordset, pass the open args and find the record in the full recordset, like this:
Dim rs As DAO.Recordset
Dim Args As Integer
Args = Nz(Me.OpenArgs, 0)
If Args = 0 Then
DoCmd.GoToRecord acDataForm, "frmCustomers"...
In the textbox control on your main form, set the Control Source, to the textbox control on your subform.
It will look something like this, in the main form's text box Control Source property:
=[frmSubForm].[Form]![txtCalcControl]
misscrf
It is never too late to become what you could have...
Did you try docmd.echo = false or application.echo = false? You need to make it true, when you want to update the results they should see on the form too.
misscrf
It is never too late to become what you could have been ~ George Eliot
Before you close the update form, in the vba, put this:
Forms.frmFormToUpdate.Form.Requery
If you are updating a subform, then this:
Forms.frmFormToUpdate.frmSubformToUpdate.Form.Requery
misscrf
It is never too late to become what you could have been ~ George Eliot
I have a filters private function on a form, to dynamically generate the SQL for the record source on a subform, for searching records. I run this onload of the main form, and afterupdate of a series of text box (dates), comobo box, and check box controls. Below is the Filters code. When the...
I have 3 combos. The first one is to pick the type of voting panel. Some of the options are a panel type (column(2) - hidden) of a person, the others are a group. If the type of voting panel chosen is a type of person, a person combo is shown. If the type of voting panel chosen is a group, a...
I typically make a Visio database model diagram, doing a reverse engineer feature. My issue now is that I have Visio 2010, but I need a model for a database on a 2014 server. It seems the Visio driver in 2010 is not compatible for SQL Server 2014 database connections.
I tried the generic ODBC...
I found if I typed a format (instead of picking General Date) the time shows properly. The format I typed in is the following:
mm/dd/yyyy h:nn ampm
In case it helps someone else. You can still use the standard date picker, but will need to leave and come back to the field to fix the time...
I have a subform with a datetime field (linked from SQL). It shows a calendar picker, but doesn't show the time. I switched the format to long date, and that didn't work. Anyone know what I'm missing? Users need to be able to pick or enter date AND time into the field. I've been...
Thanks for the suggestions. I feel like eventually I will use some 3rd party, and some custom built, to create a complete documentation toolset. I wrote this simple function (below). I added it to a separate module, that I call Mods. It's where I keep the majority of my public functions. I'm...
I found this, which is pretty helpful.
http://www.accessdependencychecker.com/
I'm thinking of writing some code that will insert info into a table.
I want to focus on getting all controls on every form, so I can be sure what events are in use, and what rowsources are calling what...
When I try to run that query, I get this error:
I run the documenter, close the useless formatted report, and try to run that. It can't seem to find the table.
misscrf
It is never too late to become what you could have been ~ George...
Thanks, Duane! I knew about that documenter, but always hated that it just produced a formatted report. I'm wanting to be able to look up a linked table/view and find anywhere it's being used. I want to be able to convert queries to SQL views, and link them back in. But in order to do that, I...
try this:
http://www.vbforums.com/showthread.php?700021-Change-font-in-Word-bookmark-using-VB-6
misscrf
It is never too late to become what you could have been ~ George Eliot
Do you have any code on where the hyperlink is? It would help if you could post that. Is that hyperlink on a label, in a text box, or something else? Is there on-click or on-enter code for the control?
I found this code online, and it works very well. I put it in a separate module,(which I...
I'm looking for a tool (preferably free or free trial) so I can document all objects and such in an Access database. I am looking at replacing a linked SQL view, and will need to know everywhere I use it. Whether it's a record source for a form, row source for a combo or listbox, or if it's in...
No, you got it. I ended up realizing I could do the same, I just formatted it differently.
Debug.Print "Start doing step N"
Debug.Print Format(Now(), "hh-mm-ss")
blah blah step n
Debug.Print "finish doing step N"
Debug.Print Format(Now(), "hh-mm-ss")
Thanks!
misscrf
It is never too...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.