Cronk, the 'shortcut points to batch file on network that updates and then runs the app' approach is actually much less sophisticated than an integral self-update. Second, you might want to take a look at the link I provided the OP.
@Cronk - You might have problems with this moving forwards, if you mean a root folder.
Windows 10 makes running things / copying things into root quite difficult at times as part of increased security. I would be tempted to test a Win 10 environment with your code to make sure it's compatible.
@Cronk - You might have problems with this moving forwards, if you mean a root folder.
Windows 10 makes running things / copying things into root quite difficult at times as part of increased security. I would be tempted to test a Win 10 environment with your code to make sure it's compatible.
Great ideas guys, thank you all! This is a very interesting discussion to me.
CJ - I am definitely going to split them out. You guys have sold me on that. Thanks for the info.
Frothingslosh - I have experience with a couple of batch files, but some of the users here do not have administrative privileges so that may run me into issues depending on where I am saving it. I really liked the code in the post and I think I am going to alter that a bit.
I'm at work and keep getting pulled away from these posts, so excuse me if I am partially coherent. I have tried to write this about 3 times.
The recordsetclone version of the originally posted code has been rolled out and works perfectly. I added a line to each part
Code:
If .RecordCount > 0 Then
and I removed the beginning part of the code that looped through and set all the numbers to 0. I changed how the recordset is being pulled from
Code:
Form_matform.Areas_subform16.Form.Filter
to
Code:
Forms!matform.Areas_subform16.Form.Filter
It is working very well from what I have seen so far.
One thing you should be aware of - RecordCount specifically only counts the number of currently loaded records. This distinction is important because a large recordset won't load all at once, so if you ever need a count of the total number of records, you will need to either do a separate DCount or else use the recordset.MoveLast method before checking .RecordCount.
For determining if there are ANY records, you should be fine, although it's generally considered slightly better practice to check against recordset.EOF (or, if this isn't a fresh recordset, EOF and BOF at the same time).