User Profile
Collapse
-
Ok....what about looping through the records that are going to be added? It will not be the same number of records each time the process is run. -
It would need to get a count of the the records it imported, loop through them and give it a number (voucherNumber) .Leave a comment:
-
How to append Records to a table via VBA?
I'm moving a database from an Access backend to a SQL Server 2005 backend.
What I need to do is to append the number of records that get pulled in from a table and increment the voucherNumber field to the next available one.
The code below was originally written in DAO.
Code:Dim RecordCount As Integer Dim strSQL As String Dim db As Database Dim rec As New ADODB.Recordset
-
Thanks for the info...will try it out when I get a few minutes.Leave a comment:
-
The same...it created the file.
Here's the complete code...
Code:Private Sub cmdGenerateFile_Click() Dim strExportFileName As String Dim strPositivePayFileName As String Dim strPositivePayExportFileName As String Dim blnIncludeYear As Boolean Dim blnUseBankNaming As Boolean Dim strBankAccountNumber As String blnUseBankNaming = DLookup("UseBankNamingonPositivePay",
Leave a comment:
-
Neo -
It is....I have msgboxes that shows that it is.
Funny thing is...when I change to parentheses, it works, but not brackets, which is what I need.Leave a comment:
-
Using VBA to Export a CSV File To Include Brackets
I need to export a file through VBA, but as part of the file name is to include a Date/Time stamp in brackets.
Here's what I have:
Code:strExportFileName = "C:\My Documents\" & strPositivePayFileName & "[" & Format(Date, "mmdd") & Format(Time, "hhnn") & "].csv"
Code:DoCmd.TransferText acExportDelim, "Positive Pay Export
-
Stupid question - this will give me the beginning of the the current week, but how do I get the previous week's beginning and end?Leave a comment:
-
Find The Week Begin and End Date Based On Current Date
I apologize in advance if this has been asked for or if I'm missing somithing obvious, but I have a form that I want to auto populate the week beginning and week ending date based on the current week. I'd also like to be able to selcect (via Option Group) last week and it give me the week begin and end date.
Thanks in advance.
Jeff -
Formatting a Fixed With Query Column
I have a field in SQL that contains a Currency amount, which will be used for an export. It needs to be 13 characters long, preceded by 0 then the dollar amount, without the decimal point.
The field name is DOCAMT. To get the full amount, I'm sure that I need to multiply the currency by 100, but how do I get the dynamic part of the field to be 0's.
Since this will be an export, it would need to be a query instead of... -
This is what I have:
Code:Option Compare Database Public Enum OfficeAppName ' enums always start from zero, unless otherwise specified ' for demonstration purposes (on the worksheet), start from 1 Outlook = 1 PowerPoint = 2 Excel = 3 Word = 4 Publisher = 5 Access = 6 End Enum Function IsAppRunning(appName As OfficeAppName) As Boolean
Leave a comment:
-
I placed the code in a module and put the msgbox IsAppRunning(Ou tlook) and go a Compile Error: ByRef argument type mismatch.
Any ideas?...Leave a comment:
-
Determine if Outlook Is Open - If Not, Open It
Is there a way to tell if Outlook is open before sending a message and open it if it's not?
I have some old code that I have been using:
'Determine If Outlook Is Open. If Not, Open.
Set objOutlook = GetObject(, "Outlook.Applic ation") ' Determine if Outlook is open.
If Err <> 0 Then
Call Shell("C:\Progr am Files\Microsoft Office\OFFICE12 \OUTLOOK.EXE")... -
Actually, I figured it out....It's Environ("userpr ofile")&"\"&env iron("username" )&"\" &"My Documents".
Thanks.Leave a comment:
-
Pulling User Environment Settings
I'm trying to pull some user settings in VBA, but I'm not quite sure what the correct syntax is.
I'd like to pull the logged on User Name's My Documents, no matter what version of Windows they are using...XP, 7, or 2003. I think the syntax is Environ("userna me"), but how do I get Username\My Documents regardless of what version?
Thanks. -
Thanks!
Something so easy cost me a couple of hours searching...Leave a comment:
-
How to call a form name from a lookup table
I have a database front end that stores variables based on what the user is doing. What I want to do is requery a form, but the form is being looked up from the table.
Ex.
Code:Dim strFormName as String strFormName=dlookup("FormName","tblCurrentValues") if CurentProject.AllForms(strFormName).IsLoaded Then Forms!strFormName.Requery ...
-
Importing CXML Into Access
All -
Is there a way to import CXML into Accesss? I know that you can import XML,, but I haven't been successful trying to import CXML. I'm not sure if there needs to be transform or not.
Thanks.
Jeff G
No activity results to display
Show More
Leave a comment: