Search results

  1. J

    Table view problem

    From time to time, in table view. I get this strange behaviour. I am running Access 2019 and still on W10. First image, Open table view. The first field is already highlighted. Second image, select "Main_Family". All fields to the left are highlighted. Third image, select record 107. All...
  2. J

    field variables in sql string

    In the SQL string below, the "Main_Family" field needs to be controlled by the variable "dFamily". I need to run the same basic SQL with the "Family" data going into different fields.. This occurs n the "INSERT INTO" and "WHERE" clauses. I have tried fields(dFamily) to no avail AI has been no...
  3. J

    Persistent laccdb file

    I had a situation where the external drive, holding the remote data files, was removed before Access was completely shut down. This left the laccdb file on the drive and doing that which it was designed to do, lock up Access. I was unable to do a compact and repair, nor was I able to remove the...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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 & "'")...
  11. 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'
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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"...
Back
Top Bottom