Search results

  1. M

    VBA 1004 error on second time through loop

    This macro is intended to get a range from one sheet and put it on a freshly created sheet, then get the next range and copy to another new sheet. It works correctly first time round, but on the second time at Select it gives a 1004 application- or object-definition error. The debug.print shows...
  2. M

    'Like' returning different results in vba vs query builder

    This query in the builder returns one row as expected SELECT Log.ID, Log.Nature FROM Log WHERE (((Log.ID)="123") AND ((Log.Nature) Like "*Visit*")); But this in vba returns rows where Log.Nature does not include the string 'Visit' strSQL= "SELECT Log.ID, Log.Nature" & _ " FROM Log WHERE...
  3. M

    Question Consolidating multiple rows into one?

    Can anyone tell me how to get from this Table1: T1_ID Notes 1 note1 2 note2 to this Table2: T2_ID Notes 1 note1 note2 ? I am trying to make notes from an old database available in a new one which has a different structure.
  4. M

    Trying to connect Visio to secured (ULS) Access database

    Hi, I normally open my database via a shortcut so that the correct security information file is used. When I tried to connect Visio to the database (via the database wizard) I got an "unrecognised file type" message when trying to specify the shortcut (database.mdb.lnk). When I tried to go...
  5. M

    Check length of string which includes asterisks

    Hello, I want to enforce a minimum string length in a search. The following code gives the messagebox when the text box txtNameSearch is empty, but proceeds to fill the listbox with results if the text box has one or more characters in it. Is there some special issue with asterisks in this...
  6. M

    Form slow to load (Access 2003)

    Hello, I have a form which is consistently slow to load. Is there some way to make Access 2003 tell me what it is doing behind the scenes while the hourglass mouse pointer is displayed? Background: Unbound form with text boxes for entering search terms and list boxes for displaying results...
  7. M

    .mdw makes my head spin

    I've been trying to grasp User Level Security on here and around the web but one thing is leaving me lost. I have a backend on a fileserver, with a .mdw in the same folder. On a user's machine I have a front end and a shortcut which specifies to use the .mdw on the fileserver. If the user...
  8. M

    Can't restrict spell check to a single field

    Hello. I have the following code which is intended to check the spelling in a Comments field. I can't understand why it also checks the Name field on the same form. I want to restrict it to the comments field because the Name field is locked in the form in question (and people's names often...
  9. M

    DCount criteria based on report detail

    Hi, I can't figure out what's wrong with this Dcount, which is the source for a text box in a report detail section - It just returns a zero for each detail row. =DCount("[ClientID]","tblPlace",("[Date] Between #" & (Date()-31) & "# And #" & Date() & "# )") And ("[SiteID]"=" & Me!Text55 &...
  10. M

    Max versus Group By problem

    I want to get the most recent item per client from a table. ItemID (primary key, autonumber) Date (date) ClientID (foreign key, integer) If I select ClientID (group by), Date (Max), then I get the results I'm expecting, but I want to also return the ItemID so that I can join some other...
  11. M

    vba to format textbox in report?

    Hello AP forums, I want the contents and format of a textbox to change depending on field values. The following is working with respect to the text, but not the formatting (BackColour). Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If [MoveOnDate] < Now Then...
  12. M

    Trying to summarise data to fill a chart

    Hi, I'm stuck trying to tally and summarise some data. I have clients with a current location. Locations have a value for Facility A and value for Facility B. This is in a separate table as it can change over time. I want to simplify it so that if a Location has Facliity A value > 0 then...
  13. M

    Change Pivot Chart Weeks to financial year?

    Hi, I have a pivot chart which shows data by week of the year. Is there any way to have Week 1 start on April 1 (or other arbitrary date)? Thanks. Mr Smin
  14. M

    Force user to encrypt Word form using template

    Dear AWF, I need to distribute a Word form to people in other organisations and have them email it back. I want Word to at least default to, and ideally force, encryption as the form contents are confidential. I created a .dot which is encrypted and prompts for a password on opening. I then...
  15. M

    How to get set of records into array then loop though?

    Dear AP Forums, I want to query my Sites table and then loop through some VBA for each of the sites returned by the query. I imagine I need to do this by putting the query results into an array but I can't figure out how. Please could someone recommend a tutorial, or explain this? (please...
  16. M

    Access hangs formatting long subreport

    Hi, I have a subreport which works correctly when it displays a few records, but when it returns enough to make the subreport more than one page long, Access' status bar shows "Formatting - press ctrl+break to stop" and hangs. Please could someone tell me a way around this? Thanks. Smin.
  17. M

    Normalising time-share vs full-time occupants

    Hello everyone, I have a situation where I want to report on occupancy in residential buildings. Some of the occupants are full time, staying one or more years. Some are 'testing the water' for a few weeks, possibly progressing to full time. In this trial phase, a single room may be used by...
  18. M

    Listbox items into table rows?

    I am trying to make a flexible checklist (of things which have to be done to discharge a patient from hospital). My preferred interface is a multi-select listbox - the user selects items which have been done and then clicks a button to confirm. I'm open to other suggestions. My intention is...
Top Bottom