Search results

  1. J

    Expected =

    In the calling sub, printIt(), the line " doReport(me.name, "PDF", "Bay", True)" returns an error, "Expected =". I have tried renaming both subs, but continue to get the same error. The sub printIT() will reside in various forms that control reports. The sub doReports() is in a module and...
  2. J

    When "X" is not equal to "X"

    I have the following code snippet that refuses to do as it is bid. The idea is to catch an inadvertent "setfocus" to a control that already has focus. From the screenshots it is obvious that the control name and the string "str" are the same yet the "Then" clause is still activated. Private...
  3. J

    Followhyperlink alternate

    After having problems with followhyperlink I searched the net and found this site https://stackoverflow.com/questions/66698889/open-links-using-vba-without-followhyperlink. I installed the software and tried again with the same result, which is; In development mode, access 2016 64bit and w10...
  4. J

    Using a variable in sql query

    I have scanned the net and got so may different answers, that don't work, to this question' I am trying to replace the "From" clause with a variable in the code below. I keep getting an error in the from clause no matter what variations I try. Private Sub Command100_Click() Dim sTable As...
  5. J

    macro or function preventing saving date to a field.

    That title should read DATA, not DATE. I am getting this message after update on a combobox. There are no macros or functions in either the "afterupdate" or "gotfocus" events of the two controls involved. I have run the debugger a number of times and even changed the destination control from a...
  6. J

    Loss of formatting when copying forms in access 2016

    When making a copy of a form in access 2016, the back colour of all buttons is changed to a light grey while the back colour of labels and text remains unchanged. The property sheet of the buttons shows the original back colour highlighted. This happens when copying within a database or from on...
  7. J

    accde doing crazy things

    is there a way to track program flow in an accde file. When I run my software in debug mode it behaves as I want it. When I run it in accde mode it goes through the startup procedure twice. I have recompiled many times, without error but still get this same behaviour. I cannot post the full code...
  8. J

    findrecord finds partial input.

    How do I stop findrecord from returning a partial input? My search string is "505.1" findrecord returns a record containing "505.1DM". I cannot find a way to ensure it only returns a record with the exact search string. Is there a way around this or do I need to use a method other than findrecord?
  9. J

    MSOffice error message

    I am using this code to display images, Public Sub showPic(str As String) DoCmd.SetWarnings False Application.FollowHyperlink str DoCmd.SetWarnings True End Sub If the image is a JPG it displays in the default viewer without an error message If the image is a raw, .nef, image...
  10. J

    Add a table to a split database

    My database is split with front end, back end. How do I add a new table other than delete the links in the front end, copy the tables from the back end and then split again. Is there a way to add the new table without all that rigamarole. I am currently using the code below to re-link after a...
  11. J

    Another query query.

    I think I know the answer to this one but I'll ask it anyway. Is there a way to use a combobox.rowsource as the input to a query, rather than build a new query every time. To explain: My form is used with 6 different tables. That means 6 queries for a combobox and another 6 queries to reduce the...
  12. J

    Another query query.

    I have an append query that Access seems to think is not good enough. The one field, that is the main criteria, "Taxon.Family" does not get appended. Access keeps adding this field to the append list, causing an error with two fields being appended to one. How do I stop Access from causing this...
  13. J

    A query query

    I have a "Yes/No" field in a table and I want to count the "Yes's" with a query. I have three records as "yes" If I use "Count" and a criteria of "False or No" it returns null. If I use a criteria of "True or Yes" it returns the total records in the table. If I use "Sum" and a criteria of...
  14. J

    querydef with parameters

    I have a series of almost identical queries that I would like to put into a qdf with parameters. I have used these in the past but my knowledge of SQL is not up to the complexity of this . A variant of the query shown is used as input for a bevy of count queries. There is also a set of append...
  15. J

    subscript out of range

    I have an array with 3 elements. Using the code below, if I call getargs(Args, 4), the code runs through the "if /else/end if" section error free but returns "subscript out of range" when it encounters the "IIf() statement. Is this a peculiarity of arrays, that they don't like the iif()...
  16. J

    recordset positioning problem

    I have two tables that are used in multiple sub's, for different purposes, in the same module. I have tried using different "Dim rsx as", "rsx.close and "rsx = nothing" with "x" being different in each sub. Trouble is the ".move" in one instance is changing the position in all instances of the...
  17. J

    screen.previouscontrol problem.

    This sub is on a form to catch the previous control and works correctly if the control is a command button. If the control is a textbox "Ctl" holds the contents of the box as a string. Private Sub btnAbout_Click() Dim ctl As Control Set ctl = Screen.PreviousControl ' getHelp...
  18. J

    In which form section is my button?

    My form has a detail section and a header section with command buttons in both sections. How do I determine in which section is a particular button? It seems "Forms.section.name" is the required syntax but I cannot get it to return anything except an error message, " object does not support..."
  19. J

    hyperlinks.

    I have a help button with "application.followhyperlink" to a word document which has hyperlinks. Is there a way to go to the internal docx hyperlink directly from access. I.e. I have a docx hyperlink from contents to the description of the main menu. If I click on "help" from the main menu in...
  20. J

    recursive setfocus.

    when I run the code below with the first copy of cboBox_gotfocus the code flow is as follows; from setfocus in collect afterupdate to box gotfocus and call box_afterupdate. runs the code in box_after which sets focus to another textbox box-afterupdate ends and the code returns to box_gotfocus...
Top Bottom