Hi guys,
This is a strange problem I recently encountered. I found a fix for it on Microsoft's website but I want to understand the problem and how it might potentially affect my program.
The error is: "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry."
Essentially I...
Hi,
I currently have a process to import an Excel file using the Transferspreadsheet method. The Excel file has fields with spaces, so the field names in my Access table must match (thus having spaces).
In the code for a field without spaces, the recordset is
test =...
Yes I did that, but it's in very technical terms. I'm looking for a more english translation on when I should be using it. Yielding control to the operating system and returning a value of open VB forms doesn't help me understand why it works in this particular instance.
Thank you.
Hey it works! Thanks for all the suggestions.
A few follow up questions, why do I need to explicitly identify controls?
eg: why is Me!txtPercent different from just txtPercent since it's on the current form?
Lastly what exactly does "DoEvents" do? If the code is running, why is it necessary...
Hi guys,
I've created a percent counter by using this code in a loop, so with each iteration i and j get increased and a percentage is shown.
Dim strFormat as String
j = j + 1
Total_progress = j / i
strFormat = Format(Total_progress, "0%")
txtPercent.value = strFormat...
These are all very good suggestions.
The way I was going to go was to create the 2 queries, one where it matches and one where it finds un-matched and doing it in 2 parts would speed it up (plus I wouldn't have to check conditions).
However what I realized was the data was at a lower level...
I'm not sure because there are conditions I need to check. I know limiting the number of IFs and conditions will make it go faster but I have no choice.
I need to look through each record, if a match is found determine the type of match, so I have a short CASE statement (only 4 elements)...
Hi,
I've never written a program with this many records before and the time it takes to process is through the roof.
I have 1 table with 5,000 records and another table with 160,000.
What I need to do is loop through the 160,000 and update the 5,000 accordingly.
Essentially my code looks...
Hi,
I have a dynamic report report and based on a certain criteria I want to put records into the page footer.
For example, if my table looks like this:
Item Cost Use
-----
comp $1,000 my computer
car $2,000
house $3,000 where I live
I want the...
Hi,
Here is what I'm trying to do. I have 6 queries and I need to output the data to the same Excel sheet with calculations that I will do in Access. So essentially I want to create an Excel file, write my values to it and then save it.
I know the starting part would be something like:
Dim...
Ya I realized that it returns a string with replace because when I try to sort it by Marketvalue it takes the first character, so $33,9 is now smaller than $4,1.
Oh these horrible users.. ;)
The only thing I see now is when I sort (it needs to be sorted by highest market value). It does not recognize the first 2 digits, so it seems it is looking at the first number and deciding if it is bigger or not.
eg:
$33,9
$4,1
$5,8
Hi Golom,
It works when I use the code you gave me but no in conjunction with how I'm building the value:
Market: Replace(Format(Sum(Round(([MarketValue]/100000))),"$#,,.0"),".",",")
it just returns: $,0
Could you explain to me what that code is doing in more detail?
Thanks.
Hi anotherhiggins,
I'm in Canada and for some reason (whether it be right or wrong) the user wants the comma. If it were me, I'd just round and be on my way :)
I got this from a user in another forum:
Replace(Format(34450000.00,"$#,,.0" ),".",",")
but when I replace the 34450000 with my...
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.