Search results

  1. A

    Bookmark on word document

    Hi Guys, I got bookmark added on word template where I want to display data from MS access query. The following code is written in Access but it doesn't populate any data in word document. I tried to run the query and it works fine but bk.range gives me null value in the following code: With...
  2. A

    ODBC - Call failed error message

    Hi Guys, I am using Access frontend and sql server backend . There is a select query built on the frontend which is giving me "ODBC - call failed The text, ntext, and image data > types cannot be compared or sorted, except when using IS NULL or LIKE > operator" error message . Below is my query...
  3. A

    Query to check data in old and new tables

    Hi Guys, I have created a new table which has replaced the old tables due to business needs. Now my report is not pulling through the historical data as it's pointing to the new table. How can I change my query so it will check reference number in old table and if it's there then pull through...
  4. A

    Sub form to store value from the form

    Hi guys, I have been trying to resolve the issue but no luck . I have a form and there is a sunform within it . So I want to store the value of ‘DocCheckId’ text box from the form to ‘FormRef’ within subform. It is storing 0 for each entry in the sub form at the moment . Any help will be...
  5. A

    Validation on textbox not to accept any alphabets

    Hi guys, The following code checks if any alphabets are entered in the textbox and display an error message if the user is typing any alphabet. I want to amend this so that no error message displays on the screen but if the user types alphabet then just ignore the alphabet (textbox must not...
  6. A

    Outlook VBA code to save email in the shared drive

    Hi Guys, The following code opens up a dialog window before emails and attachments get saved down on the network. I want this to be automated so that no dialog save as window will open up and the emails and attachments will be saved down on the network automatically. Any help will be much...
  7. A

    VBA code to check memo fields in all tables

    Hi Guys, Is it possible to write vba code that will clear data from the memo fields from all the tables in the database. One way will be writing queries for each table and updating memo fields to null. But this way if I have 50 tables in the database then I will need to write down 50 queries...
  8. A

    Delete rolling 12 months records

    Hi guys, I am trying to delete rolling 12 months records from the table. Can you please amend the query accordingly? Dim sSql As String sSql = "delete from tblReturntowork where Datecreated=#" & Format(Date, "mm/dd/yyyy") & "#" MsgBox sSql Thanks
  9. A

    Using Ini files to create text file (with various sections on it ) to store values

    Hi Guys, I am trying to use ini files which will act as a mini database for outlook. So Outlook/VBA code will create a text file (ini file) and data is stored in a text file so everytime you need to change the data then it doesn't require changing the code . The code works fine. The highlighted...
  10. A

    Store data in multicolumn listbox from a text file

    Hi guys, My code is written in outlook vba and I am trying to figure out the issue with storing different data each time in the listbox based on the relevant option selected on the form. So, If we need to update listbox based on the 'option' selected in a frame , I have written a sub as...
  11. A

    Export the query in Pipe delimited .csv format

    Hi Guys The following line of code exports the file in comma separated format but not sure what change needs to be made to export it in pipe delimited format. Any help will be much appreciated. With db.CreateQueryDef("QryTest", strsql) ' create a temporary query named QryTest...
  12. A

    Populate 2 column listbox using outlook vba

    Hi Guys, I am thinking of a way to populate 2 column listbox based on data stored in a notepad (on the network). I don't want this to be hard coded so if anyone wants to change the options then just make changes i notepad and listbox will get updated automatically. Can anyone please help me...
  13. A

    Display text value and label caption outlook vba

    Hi Guys I am writing the following code on the OK button of the outlook form. Actually I want to display the value stored in a textbox and caption of a label. But when I run the form and click OK then it doesn't display anything for the texbox and label caption. It's really strange. I have...
  14. A

    Distinguish between visible and invisible attachments Outlook

    Hi Guys I have written following piece of code to save down attachments into pdf format on a shared drive but this code saves down logos/signatures in the email to the shared drive as well. I want to put a control that will ignore any invisible attachments and only the real attachments get save...
  15. A

    Refresh listbox in database 1 on the close event of database 2

    Hi guys, I have an access database 'DB1' and there is a listbox which shows all the activities . When double click event occurs on that listbox then another database 'DB2' with relevant form opens up and the users are supposed to complete the form . When the user completes the form and close it...
  16. A

    MonthRef criteria doesn't work in the code

    Hi Guys The below code to filter a listbox which works fine if we use supervisor filter and ActivityType filter but it doesn't work for MonthRef filter. MonthRef field has datatype 'Date/Time' Private Sub cmdSearch() Dim db As Database Dim rs As Recordset Dim bCriteriaEntered As Boolean Dim...
  17. A

    Loop through all the selected items in a listbox

    Hi Guys The below code doesn't update all the selected items in the listbox . It just loop through the first item multiple items. Can anyone please figure out what's going wrong here ? Thanks With Me.lstAllocation For i = 0 To .ListCount - 1 If .Selected(i) Then...
  18. A

    Create a form in outlook to pre-populate values

    Hi Guys I am new to outlook vba and would like to create a form that will open up when user click on a button on the ribbon. It should pre-populate the following things: 1. The email subject on the form label. 2. 10 digit account number in a textbox on the form. (The account number is the part...
  19. A

    Updating records using Top 55% or Random function VBA

    Hi Guys My challenge is to quarterly allocate various activities (e.g Call audits, Staff reviews,meetings etc..) for the staff members. Sometimes there are 2 or 3 activities to be taken place quarterly for the some of the staff members. So I have done the following and need your help in...
  20. A

    Outlook VBA code to convert attachments to pdf and save in a folder

    Hi Guys I am looking for outlook VBA code so that when the user selects the emails in his folder and run the macro then it should check all the attachments in the email. The below things macro should do: 1. If its word document then convert that to PDF and save it down in a shared folder. 2...
Top Bottom