Search results

  1. H

    if "1" is typed it shows "!" and vice versa

    A user has complained that in one particular text box, if she types a "1" it shows as "!" and vice versa. This is only in one textbox and only if she types a 1 not 2 or 3 etc. moreover the box is set for numbers only yet it accepts the "!". The capitals or shift are not being pressed! I cannot...
  2. H

    No grid shown on form! Missing an OCX?

    A third party exe program which seems to have been created using VB or the likes, uses an Access MDB as a backend. When opened using WIN XP (on a PC with Access 2003) the form displays what seems to be a subform consisting of a grid which contains data and is populated by the backend MDB...
  3. H

    code to convert excel worksheets into csv

    I am posting this as a separate thread even though I had tagged it onto another thread as I fear it may be missed! I would like to know whether there is any way for a module to convert all sheets of an excel file into csv. i.e sheet1 becomes csv1, sheet2 becomes csv2 etc. I have looked in a few...
  4. H

    my views of vba have gone funny!

    Until now , when viewing code for a form or report in vba, Pressing the relevant button opened vba with the project explorer,properties and immediate windows besides for of course the code itself. Now when opening I have to open each one seperately and it still doesnt look right even after I...
  5. H

    different code for maximize and minimize?

    I have code which runs on the forms resize event. However I only want it to run when maximized not when minimized. Any way to trap this? Thanks
  6. H

    What event happens when jumping from form to form?

    The following is a quote from MS VB help:- Note The Activate event doesn't occur when a form receives focus back from a dialog box, popup, or another form. My question is so what event occurs if a form gets the focus from another form? I tried the got focus event and put a breakpoint there...
  7. H

    Delete SQL not working?

    Why does this sql not work? It brings up the records which satisfy the criteria if one clicks on the view button. Yet does not delete the records! No warning signs appear at all DELETE pupils.*, pupils.[Pupil ID] FROM pupils WHERE (((pupils.[Pupil ID])=[Forms]![Parents]![cmboPupilsDelete]))...
  8. H

    shuffle two fields of a Db differently! but retain ability to relink them

    in a Dbthere are 2 fields which contain 'matching' data. (there are other columns too) A Genesis B Exodus C leviticus D Numbers E Deutronomy I want to shuffle both columns so they are both randomly mixed up B Numbers A Exodus C Detronomy E Leviticus D Genesis How do I do it? I have explored...
  9. H

    randomize 2 columns separately.

    I have read a lot about the rnd function to succesfully randomize the order of records in a db. I want to randomize 2 columns separately . These are Q's and A's so if the db is 2 fields (the second -small- letter is supposed to be under Field 2!) Field1 Field2 A a B b C c D...
  10. H

    User decide fields visible on report

    I would like to build a form which lists all fields of a report and has a checkbox next to each one. By the user ticking the boxes, they decide which fields are visible on a report. I could hardwire the whole thing, however, I would like this to be a stand alone module that I can put anywhere...
  11. H

    Not on list does not recognise '[' bracket

    I have a dropdown combo which includes some entries which are bracketed e.g. [Bombay] But when the user types in that exact string with the brackets, it traps it as not on list, offers to add it and then hey presto the user has managed to tot up at least 10 of these entries all identical! Any...
  12. H

    Like criteria ignores "[" character

    I have some string entries as [Baghdad] (the square brackets are part of the string) If I query on "[Baghdad]" it finds them If I use "*baghdad]" it also finds them BUT if I query using like "[baghdad]" it does not find them Even stranger if I search on like "*[Baghdad]" it brings up about 70...
  13. H

    reference to a fieldname fails because of quotes

    I have a recordset and I need to refer to a field using a variable e.g instead of rst.Address I have rst(variable). However the variable is being taken out of an array as a string so it looks like "address". The code therefore fails looking for rst("address"). How can I adjust this reference so...
  14. H

    .bat files works fine but errors when run from vb

    I have a bat file which outputs text to an html using awk. The files needed reside in their own folder and all works fine. However when I call the bat file from within vba (using shell) it opens the bat file but can't find the other files it needs to execute the bat properly. In fact it seems to...
  15. H

    tranferText to a CSV directly from sql statement- Possible?

    I have a SQL statement built on the fly. I want to transfer the data of that SQL to a new CSV file. So far I have had to create an actual query to dump in the data and then transferText to a CSV. Is there any way I can miss out the middle step? The transferText method seems to demand an actual...
  16. H

    calculation criteria on max(date)

    My query selects all those who donated to a fund.The max on the date restricts all but their last donation, working fine.But now I want to list all those who have not donated anything in the last x days (user defined). I want to use Date()- dateField>30 but now it does not let me peform the...
  17. H

    How to catch the last record before a change?

    I know that there is a function to look at a previous record and thus identify if there as been a change in a certain field. What I need to do is to catch the last record BEFORE a change. Obviously in a report, once it has moved to the next record, it is too late by then to change a previous one...
  18. H

    Only show balance (running sum) for last record on that date

    I would like to replicate a bank statement. One column for in and one for out and another for balance (and a column for the date of transaction). However (like bank statements) I only want to show the balance for the last transaction of a particular date. Also I only want to show the date for...
  19. H

    refer to recordset field using variable

    In a DAO recordset, I want to refer to a field without using its name directly (for various reasons!), rather using a (string) variable which has previously been set. How can I get this to work? (where rst is recordset etc) rst!Amount 'works fine because that is the fieldname but dim...
  20. H

    use different forms for startup depending on external criteria

    I have one db with various forms. I would like to have different forms open at startup depending on external criteria. In short can I run any code before any form is opened which would look like this dim Startup as string startup= source......... docmd.openform startup Should I put this code in...
Top Bottom