I'm pretty frustrated here, been trying this for days...
All I want is for German users to be able to enter dates that should be stored in SQL Server. The dates are in the following format "dd.mm.yyyy". I always get error messages like this one: Syntax error in date in query expression '#23.01.2004 00:07:00#'. - using Access for now.
I'...
In example:
For Each mytemplate In Templates
If mytemplate.Name = "Normal.dotx" Then _
mytemplate.BuildingBlockEntries("Leeg").Insert Where:=Selection.Range, RichText:=True
Next
...
I'm trying to fill an array with consecutive integers using Excel and VBA to pass to the Subtotal function. I need a dynamically sized array of consecutive ints. The fnction works when I use Array(1,2,3,4,5) for example, but not if I try to use a dynamically sized array.
I've read some articles on this but none actually worked - has any...
Hi all,
I need help coming up with a method to allow a user to export a query's results to an xls file on a button click event.
I've tried using an Output To macro, but it doesn't work for a query containing 30,000+ records.
Thanks in advance
...
I've created a function in excel which basically searches a dynamic range in a For statement for a string and returns the value of the cell one column over. It's basically a budgeting function, but that's beside the point.
Here's the problem, everything works with small results, but when the results get too large (say around 32000... fo...
i cannot see why this would be an issue. i use the msgbox to display my strSQL, but it looks perfectly fine.
Dim strSQL As String
strSQL = "INSERT INTO Jobs (Date, RefNo, ProjectID, PManager, PDesc, PONo, Src_Qty, WC_Qty, Rate, Total, Note, Company) "
strSQL = strSQL & "VALUES (" & JobDate.Value & ", '" _
& T...
I'm using VBA to sort columns in Excel 2003. I need to sort by column 5 ascending, then column 3 using a custom order, then by column 4 ascending. I'm having difficulty getting the sort to work and I don't totally understand how OrderCustom applies.
Any pointers in the right direction would be appreciated :) My code is below.
With wsDa...
I have a macro that uses the Dir function.
MyFile = Dir(CurDir() & Sep & "*.xls")
Do While MyFile <> ""
...
MyFile = Dir()
Loop
How do I extract just the filename from MyFile (exclude the extension)?
...
Hello,
I need some help on writing some VBA/SQL code into a module in Access, which should do the following:
Loop through Table 'Schools', with just one field (SchoolName).
Use each value in the first table to select records from Table 'ChildData', with several fields about individual children, including which school they attend (Scho...
We have developed a consolidation function that will be used by other processes and want to position the function in its own MDB (call it "remote") so that it can be referenced and called from "caller.mdb" when its needed. The function is designed to return an array and works great when executed called directly from within "remote." Howe...
Specifically, I'm a n00b making a db. So far I have a form set up like I like it, but no values are bound b/c I need to switch between tables (I could probably just add all of the fields from the first table to the second table, but half of the point of me doing this myself was learning).
I've encountered two problems.
First, I'm havi...
Okay so this is another question about a previous question I asked:
http://stackoverflow.com/questions/1435802/rookie-sql-inside-of-vb-question-msaccess-2003
I am pretty new at this so I appreciate the help guys!
So lets say I have a form and I want the SQL string in the VB to fill out a form based on parameters selected by the user o...
Hey guys! Was wondering is anyone had any suggestions on books or other resources on learning novice to advanced VBA as it relates to access programming. I have bought and read the "Access Bible", "The only access book you'll ever need", and "Sams TY in 21Days" and they were all fine for learning the basics.
Then I bought and read teh O...
So how can I pass a value from one form to another? For example: The user select's an organization from a list and this opens up a trip form that allows a user to enter various information regarding the trip. At one place I would like to add another little pop up form where they can enter contact information (just a name and phone for PO...
The file exists, opening workbook works but Application.run gives 1004
Set wbtarget = Workbooks.Open(mypath + "\launcher.xls")
Application.Run (wbtarget.Name & "!StartMerge")
...
Hi,Please Help me in following problem:
this code work in VB but doesn't work in VBA:
also I add in beginning a combobox with index 0 to form1
For i = 1 To 5
Load Combo1(i)
Combo1(i).Visible = True
Combo1(i).Left = Combo1(i - 1).Left + Combo1(0).Width
Next i
I will have this code in VBA.
thank you
...
So I have an input form that I want to use to update a table with certain fields of information. I have the ID of the record automatically coming up in a text box. I have three text boxes that I need to add to the table (excluding the ID) on a button click.
Name
Date
Method
are the field names.
As_Name
As_Date
As_Method
are the text ...
I don't know anything about VBA but I need to get the file name out of a file full path.
So for a string like "c:\something\somethingelse\file.name" I need to get "file.name" out. Also how can you get a quote in a string such as " " "? backslash doesn't seem to work.
...
I need to find and "fix" these fields (that were inserted with TextRange.InsertDateTime with the InsertAsField flag set to true). Word documents appear to have a nice Fields property that gives me centralized access to them, and I can find the representation in the .pptx file with 2007, but I can't seem to find anything in the PPT objec...
Is there a way to use VBA (excel) to generate a clock time with accuracy to a tenth of a second or less?
eg:
Sub test()
MsgBox Format(Time, "hh:mm:ss???") 'not sure what this format should be...
End Sub
...