Search results

  1. A

    Store odbc connection in FE or BE?

    I have split a few different MS Access databases before with the BE on a shared drive and the FE installed on all users' local machine. In this instance, I have three ODBC connections bringing in data to my tool from an outside database once a day. Does anyone know if it is faster to store...
  2. A

    Splitting My Access DB - ODBC Connection

    I have split a few different MS Access databases before with the BE on a shared drive and the FE installed on all users' local machine. In this instance, I have three ODBC connections bringing in data to my tool from an outside database once a day. Does anyone know if it is faster to store the...
  3. A

    Loop through all text boxes on a form

    I have about 25 text boxes that get populated based on a financial transaction; quite often about half of them are empty. i wanted to gray them out if they are emtpy (.enabled = false). I could put a series of IF statements in the vba for each one, but its bulky and time-consuming. I've done...
  4. A

    MS Access VBA Recordset

    I have a recordset pulling 50 columns from a 100 column table for one record; i want to pull all fields from the recordset if not null and append the column header to the value as well; I am having issues looping through; Any help is greatly appreciated! Sample UNTESTED CODE - Just a thought...
  5. A

    deleting worksheets instead of hiding

    This code works perfectly when I hide the sheets that are empty, when I try to delete them, the code runs but none of the sheets get deleted. Any thoughts?? Dim varSplit As Variant Dim iwsCount As Integer Dim iwsRangeCount As Integer Dim blnallempty As Boolean Dim z As Integer varSplit =...
  6. A

    Evaluating multiple cells in a range

    I have code in access vba to export data to excel. If certain cells are blank in each worksheet, I want the sheet hidden in excel. With my code below, it only appears to be evaluating the first cell in my range. Any thoughts? For Each objws In objwb.Worksheets objws.Activate...
  7. A

    ACCESS SQL STRING problem

    I can't get this to run in Access vba. I get a too few parameters error. Expected 1. The problem lies here I believe : [All details table] WHERE ([updated max transaction] + 30)>=#" & Me.txt_cfodate2 & "# I think it is a date error, the txtbox I pull from is a date as well and updated max...
  8. A

    Highlight a Row based on a date

    I am trying to highlight a row based on a date. I am tryin to use the DATEVALUE on a range field and am getting a data type mismatch. Any ideas on how to restructure my code to get around this? Thanks For Each objws In objwb.Worksheets If Right(objws.Name, 6) = "Detail" Then 'MsgBox...
  9. A

    Send email from access vba using outlook

    I have code that works well below getting email addresses from a query and sending it. However, I would like to make all the recipients Bcc. If anyone could suggest some tweaks to my code below, I would appreciate it: Private Sub cmd_email_del_Click() On Error GoTo error Dim db As...
  10. A

    Access VBA to excel

    I have one template consisting of one tab in excel. I have a loop to cycle through criteria in a query and paste it out to excel. I am having a problem with my y select statement(in bold below). It is not actually pasting the text in the denoted cell. Any help is appreciated. Other issues...
  11. A

    Access VBA using dates as criteria in a query

    I am storing dates as strings as putting them in a case statement. I want to cycle through them all, but am getting an error in my SQL string statement. I think the way I am storing the dates is incorrect. Any thought?? Private Sub cmd_runholds_Click() Dim queryName As String Dim ObjExcel...
  12. A

    DMAX Data type mismatch

    What is wrong with my code: Private Sub Command20_Click() Dim rs As DAO.Recordset Dim year As Single year = DMax("[Request Year]", "Request_Year") MsgBox year Set rs = CurrentDb.OpenRecordset(year) With rs .AddNew ![Request Year] = rs + 1 .Update .Close End With Set rs = Nothing I get a...
  13. A

    Clearing a form

    Is there any way to set all of the text boxes/combo boxes, etc to null values all at once in VB as opposed to clearing each one individually.
  14. A

    from a db, send one email to multiple people

    I have code in my access db that selects certain email addresses from a table, opens outlook and sends them an email. I can't figure out how to add multiple email adresses to one email. any help is appreciated: ' Now, we open Outlook for our own device.. Set MyOutlook = New...
  15. A

    Save two tabs as 1 one workbook

    I have code which is pasted below which take 8 queries for 4 programs(summary and details tab for each), and saves them all in one excel workbook. I need to also take the summary and details tab for each individual program and save as its own workbook(four total workbooks). Anyone have ideas...
  16. A

    My SQL String is not working in my vba code!!!

    This is a small part of my code where I am pulling all the columns below from a query I created [REG - Master - Summary - Final]. I attempt to run and get a syntax error(missing operator). I think my error is near the end of the string in my WHERE statement, or my LIKE statement. Any...
  17. A

    Update query to insert new password into table

    I created a form that helps the user create a new password. I want to create an update query that will take the new password and overwrite it for the appropriate user in the table. Attached is what I have: Private Sub cmd_changepass_Click() If IsNull(Me.txt_username) Then MsgBox " Enter your...
  18. A

    assigning variable to worksheets

    Can anyone help me with my cases? I keep getting subscript out of range errors when I try to set my excel worksheets. Port is the name of the tab in excel and stPort is the name in my query. ANy help is appreciated: Function SendToPort() Dim rsOut As DAO.Recordset Dim objExcel As...
  19. A

    Remove hyphens from a string in a table

    I am trying to remove all hyphens from 1 column in a access table. I have created an update query, but when I try to insert a replace function, I get compile errors in my query expression. I am trying to strip out all hyphens from the column Award number from the Port Area table. Help...
  20. A

    How do I streamline this vba code???

    The vba code below is what I have come up with to take fields I want from a query I created in Access and paste the results into 10 separate Excel files(region 1-10). I have essentially just repasted this over four more times and changed DLSGP to my other 4 programs names that I am also adding...
Back
Top Bottom