Search results

  1. J

    Solved Conditional formatting without conditional formatting

    In the form below I want to colour each row depending on the content of the "Notes" field. If I use conditional formatting in multiple mode, after a few rules the formatting of the notes field disappears. I have tagged the controls to respond to code but the entire column is coloured. Clicking...
  2. J

    resizing an image

    I have a situation where I am adding bulk .jpg images, 2 or 3 hundred at a time, to a folder for display in access in an image control. If the images are too large, 3 or 4mb then they take too long to load Using the software below to resize an image is reducing the mb size of the image even when...
  3. J

    Solved How to handle ' in sql string

    I fave an sql string that takes it's input from a couple of tempvars. The input for one of the tempvars is Sp. 'Yarawah' from a table field, so the tempvars.value presented to the sql string is "Sp. 'Yarawah'" The single inverted commas are part of the scientific name. db.execute crashes with...
  4. J

    Solved popup & modal

    The small form pictured below, requires an input before the program can continue. If I set it as popup and modal it does not stop the program unless I also set "acdialog" in the docmd.openform statement. Acdialog puts the form on top and stops the program regardless of the popup and modal...
  5. J

    Solved SQL problem

    I have a series of 5 boolean controls where any one of them being true will cause text in a control to change. I can't get the code to work without the first criteria being true. I have tried all manner of variations without success. Do I need to use a single sql statement for each boolean, or...
  6. J

    Solved searching with a partial string

    I have a situation where a number of entries have been mis-spelled and I need to find the correct spelling in a reference list. As an example, the mis-spelled word is "Dryopteriaceae" and the correct spelling is "Dryopteridaceae". My idea is to start with the full word and work backwards until a...
  7. J

    Closing image viewing software

    I am using the following code to open a picture viewer via vba oShell.NameSpace(0).ParseName(sPath).InvokeVerb "Open" Then this code to close the viewer Dim Exe As Object For Each Exe In GetObject("winmgmts:").ExecQuery("Select Name from Win32_Process Where Name = '" & sViewer & "'")...
  8. J

    Solved Conditional format problem

    Is it possible to format one control to be the same colour as another control such as control A = RGB() of control B so that control A is always the same colour as control B without having to write an expression in control A for each possible state of control B with the same colour in each'
  9. J

    Solved Variable not defined in sql string

    In the attached sql string, the alias "A" is not recognised at the first instance of "A.accession" "Accession" is a valid field in the table "Discrepancies". If I remove the alias and use the table name I get the same "variable not defined" error on "Discrepancies" I have tried enclosing table...
  10. J

    Solved Family not included in aggregate function

    I am in the process of converting sql strings to incorporate "select distinct" and also to use currentdb.execute where appropriate. As I understand it, "select distinct" eliminates the need for the "Group" clause. The following code seem to refute that. What am I doing wrong? I understand the...
  11. J

    Unable to delete record due to record lock

    I have a form that displays an image depending on the data input to two combo boxes. A small table is created with the image location info and multiple images can be scrolled through. This all works fine until the data is changed. Before adding new data to the table I am attempting to delete the...
  12. J

    Shell.application with second argument

    I am currently using this construct to open a word document to a bookmark/hyperlink, "Help" in this instance. FollowHyperlink TempVars!XLA & "The Don McNair Herbarium Data Set.docx", "Help", , True Is there a way to implement this with the "Shell.application", it doesn't accept the second...
  13. J

    MS Office warning

    I am using followhyperlink to open an 'NEF" image and get this message. If I select "cancel", I immediately get an error message indicating a null value. Turning warnings off has no effect and there seems to be no way to trap the null error except "on error resume next". Is there a way to avoid...
  14. J

    Double jeopardy

    I have two problems in the attached sample. 1. If I leave the recordsource statement un-commented, the code goes straight to the "Createdby_Gotfocus" event, runs it then returns to the onload event. Comment it out and the code runs as expected. 2. With the "on error resume next" statements...
  15. J

    Solved It needs a bracket

    This sql string tells me it expects ")". There must be one place I haven't tried and I have no idea where that place is. The problem is in the where clause and specifically after the "And", as I read it. The where clause was originally a "Having" clause but this seemed to be causing even more...
  16. J

    Record is deleted

    I have a simple table that acquires a few records during the operation of a module. After acquiring 4 or 5 records this table is read to indicate where action is required. My problem is that I am getting an error indicating the "record is deleted." Prior to running the module I delete all...
  17. J

    instr in a filter

    I have a list of names in a field "Collector" that can include the names of others in a team, .e.g. "Jones. K. Smith. W." I want to filter this field such that it will return all fields that include "Jones" . I have tried many variations of the code below but .filter always returns "False"...
  18. J

    Solved Variable in HAVING clause

    I know this is an old beast but none of my reading, or various attempts, has set me on the right path. In the code below sTable is passed in from the calling sub but is not recognised by the SQL statement. Replacing the variable with a string, "Collection" in this case causes the SQL to run. I...
  19. J

    me.visible = true is false

    I use .visible=true in most load events to control when the form becomes visible. This works well except for a couple of particular cases. If I run the software in develop mode or click the accde file all is good. If I run it from a shortcut with windows minimized then a couple of the...
  20. J

    Error "Can't set focus"

    In the code below, the sequence of events is as follows; Load event runs through all commands and set's focus to cboFamily. cboFamily gotfocus event does it's stuff. cboFamily_afterupdate runs and set's focus to cboGenus. cboGenus goes through to cboGenus.dropdown. If I'm stepping through, the...
Back
Top Bottom