I have a situation where I need to identify a 'primary county' based on number of offices. The logic is that if a doctor has a several offices, the county with the most number of offices is the 'primary county' in which he/she is located. If there is a tie, then arbitrarily pick a county (first...
I'm having an issue with the following code snippet. What I'm trying to do is append a list of states together when multiples are selected. So, if they select Alabama, it should just return AL. If they select Alabama and Georgia, then it should display AL,GA. (note the comma in between...
Wow! that appears to have done the trick... as always PH, you are a genius! My deepest thanks.
For anyone's future reference who may look at this, I had to add 'AS xxxxx' after all each of the 'Sum(TblMemCnt.xxxxx)' in qrySumMemCnt, but other than that, worked smoothly.
It's too bad Access...
Here's what I changed it to, following your recommendations, as best I understood them... I got an error message saying "syntax error in JOIN"
I'm going to include all the fields this time because I realize that may change the equation a little, because I'm linking to another table for all...
Hello, here's some code below...
SELECT TblLOB.rpt_cust_name AS [Customer Name], COUNT(TblLOB.state_cd) AS [State Count], <snipped a lot of other fields>
FROM TblLOB INNER JOIN TblMemCnt ON TblLOB.id = TblMemCnt.id
GROUP BY TblLOB.rpt_cust_name;
What I'm trying to get is the second column is...
Hello, I'm trying to clear a listbox when the user unchecks a checkbox. It populates just fine when there's a check in the box, but I can't get the list box to clear when there is no check in the box. What happens is that whatever populated when it was check stays there when it's unchecked...
Hi, I'm having a problem thinking through this logically and could sure use some help.
I've got addresses, but the address elements are variable, meaning I could have any or all of the following address elements
Business name
Address 1
Address 2
City/St/Zip
County
The problem is that I don't...
Would this have anything to do with it??? http://www.tek-tips.com/viewthread.cfm?qid=851363
This post refers to where in/after the loop it closes the (word) document. Actually, this example uses Object.Quit, not .Close
This post does describe the same thing that's happening with my data. It...
Here's my modified code... maybe I changed something that affected something.
Sub OutputAddressWorkbooks()
' replace with table name, output file name, and field with states
Dim tbl As String, outputFile As String, stateField As String
tbl = "tblAddr"
outputFile = "c:\data\addr"
stateField =...
hmm... I tested this on production data and it crashed. I'm working with tables that have up to 1 million records btw... I probably should have mentioned that, sorry.
Anyway, the error I'm getting is...
Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has...
Ah, I think I figured it out... I had to check the ActiveX Data Object 2.8 Library.
Thank you again for being so detailed in your reply... it worked like a charm.
Hey CMP, that's really great... I'm trying to get it working.. I made the table, outfile name, and state field name a variable and modified the sql statements accordingly.
However, I'm getting an error on the following line (so far)
Dim rstStates As New ADODB.Recordset
After looking through...
After searching for the answer for three days, I'm finally posting as a question. Any help is greatly appreciated.
I have a table with names and addresses. One of the fields is STATE (however, it's not always called STATE, different tables may have a different name for state). I want to...
I'm helping someone fix some forms they created. The form exceeds the screen length and it activates centered. This is a maximized form and I asked if they can make everything fit into 1024x768 and they couldn't. So the problem is that everytime the form opens, the user has to use the...
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.