strongm,
Thanks for pointing out that error with my test of .Test. Completely missed the the quote marks. When I properly referenced the variable, tsuji's pattern did, indeed, work correctly.
I'm still not convinced that what I'm looking for in a string is not a pattern. As you've probably...
A word about the choice of which forum to post in: Microsoft themselves cannot seem to make up their mind about where regular expressions live. If you follow this link to the Regular Expression introductory page on the MSDN website http://msdn.microsoft.com/en-us/library/28hw3sce.aspx, you'll...
tsuji,
I'm going to cut and paste my test code and output. I don't believe I have any transcription errors, but it is possible, I realize.
Code and output with .Count:
Public Sub SeeHand()
'Test sub to get hand data and sort it
Dim rs As DAO.Recordset
Dim rsq As DAO.QueryDef...
tsuji
Thank you for the post and the possible solution. My need is not to search for a particular character in succession within a string, but rather to search for a particular count of characters within a string, no matter where they appear in the string.
The Sub code snippet's purpose is...
Environment: Win XP
Access 2000
Microsoft VBScript Regular Expressions 5.5
I'm teaching myself regular expressions, so I'm starting slow. I want to test for the presence of a defined number of occurrences of a particular character. For example, if the string were...
Thank you both for looking into this. My thoughts regarding the pound, at first, was that the pattern would match on any of the alpha chars listed, or any number. As I read more online, I began to suspect that the pound should fall outside the brackets to work properly, but that made me start...
Never mind. I figured out the issue. Replaced the '#' with 2-9, so that the new search pattern looks like... [AKQJT2-9]. Why this works, I have no idea, since in theory, using the old pattern with the pound should have produced results in the case of [AKQJT] holdings, but apparently having the...
Working in Access 2000 on XP box:
VBA code uses Select Case structure to search a text file for a string pattern...
Do Until StrComp(PSrsc.Fields("Field1"), "NEW HAND", vbBinaryCompare) = 0
bnDeadHand = False
Select Case True
Case PSrsc.Fields("Field1") Like "*collected*"...
PHV,
I used CLng() on the dates, but because the dates had time stamps in them, the conversion of the dates to longs was generating different values for the same dates. Thus, the summing was coming out incorrectly. In other words, 3 of the 4 1/24/2010 dates, for example, were being converted...
PHV and smedvid,
It is a date formatting issue. CLng() produced some results that "appeared" correct from the standpoint that it was not returning more than one record with the same date, but the summing is incorrect. The issue, I'm suspecting now, is that the form where the values are...
smedvid,
Yes, that is precisely how the table looks (in addition to other fields that aren't being queried in this instance). And, like yourself and Skip both stated, I have run the query using GroupBy on the Date field. The output does not properly sum as it should. I still get multiple...
Skip,
Yeah, like I said in the body of the post, I've already done that and the results are not coming out as expected.
"There is no spoon..." - anonymous enlightened child
Working in Access 2000.
A table records, among other things, the date a transaction was entered, and two currency fields. The goal is to Sum the two currency fields based on their common dates. So, for example, let's say I had three entries all occurring on 2/1/10:
Example A
1) field1...
Ok, interesting development. Apparently, Access doesn't like you to make a textbox's label visible without also making the textbox visible as well. Who knew?
Thanks for the debugging tip. It got me thinking in the right direction.
"There is no spoon..." - anonymouse enlightened child
MajP,
Thanks for the reply and the debugging suggestion. The msgbox did, indeed, fire ("Event fired."), however the control did not become visible on the form. A little more info on this problem:
For aesthetics sake, controls are overlapping each other, both made not visible at form load...
Hi. I have an option group, and based on the option chosen in the group, I want certain labels and textboxes to have their visible property set to True (the default on the form is False). So I wrote the code below:
Private Sub Frame13_AfterUpdate()
If Me.Frame13.Value = 4 Then...
Well, all, thanks for your help. Nothing like a little reboot of the O/S to set everything back to working order... Oh, and blowing away a reference library. Who the heck knows... But Harley, looks as though your StrComp idea is working, so what the hell...
Also note that the Type Mismatch error occurs at runtime, not compile time! I had to put a msgbox in my error handler to get the err.number and description.
Harley - thanks for weighing in. I'm working in Access 2000, and when I try to make the following assignment in my parent Sub...
'Move record pointer to bookmark
rs.Bookmark = bytCurrRec
... when my var is DIM'd as a Byte, I get the following error: "Compile Error. Type Mismatch:array...
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.