Search results

  1. Solo712

    Creating a breadcrumbs field in VBA

    Hi, this looks like an ambitious project, especially since the ActiveX controls like TreeView are often upgraded by Microsoft and can't be relied on. Did you look into the use of FileDialog? https://analystcave.com/vba-application-filedialog-select-file/ Best, Jiri
  2. Solo712

    jump to a record using VBA

    Hi drazen, this is easy to do. Put this as the the click event of the button. Me.RecordsetClone.FindFirst "AssocID = " & Me!MyReferenceField If Not Me.RecordsetClone.Nomatch Then ' record found Me.Undo Me.Bookmark = Me.RecordsetClone.Bookmark 'jump to it Else MsgBox...
  3. Solo712

    Error in module

    Hi, you might consider little advanced organization in your programming. The code that arnold sent has a great potential: it can be used as a general utility library and called by any program that needs this function. The advantage of putting this type of code into a general class module which...
  4. Solo712

    Databack backup script

    Hi, this is what I use for automated backup. It automatically copies the database file to a directory above the where the app sits. It has a date stamp to distinguish between files. You can write your dialog code around it if you want or put it on a timer to execute every so often. Public Sub...
  5. Solo712

    Generic way to refer to subform control in subform criteria

    At the risk of appearing cynical, why has no-one asked about the relationship between the "main forms" and the "re-used" subforms? If the OP author was copying something from some website, it may very well be that he applied the method of cascading cbos for a subform (where in the model it was...
  6. Solo712

    Generic way to refer to subform control in subform criteria

    bongbang, you should be aware that the reference notation changes depending on the position w. respect to main form/subform. For a very very good summary of the correct positional references see: http://access.mvps.org/access/forms/frm0031.htm Best, Jiri
  7. Solo712

    Corrupted db

    Hi Ellen, has your user contacted whoever is in charge of that server? Can anyone check the path to the FE file? Is the file there physically ? If not, well, hope it is found or there is a backup. If the file is there, rename it and replace it with the FE backup in the path. Best, Jiri
  8. Solo712

    Can't Find Excel-Workbook Even Though Exists

    Your problem is hilighted in red. You should do simply Set wbook = AppExcel.Workbooks.Open(strName) because the variable strName contains strPath. Best, Jiri
  9. Solo712

    Field Requirements based on conditional visibility

    You are right, should be ctl.Visible = True Best, Jiri
  10. Solo712

    Field Requirements based on conditional visibility

    The quickest way to fix your problem is to add the code in red above in the BEFORE UPDATE event. Best, Jiri
  11. Solo712

    Decimal place issue

    I am afraid this is not clear at all. The values held by the fields are not controlled by the presence of a decimal point but the data type of the field. If the field is defined as integer then, naturally, it will not accept decimal points or will round off the number when they are present. In...
  12. Solo712

    add image file to a form on open event

    no problem. Look at the second post I sent. You can change the file in the folder and it will be retrieved by a call to the Sub GetPic (from OnLoad event) Best, Jiri
  13. Solo712

    add image file to a form on open event

    I get it: Private Sub GetPic Dim Myfile as String 'will get the first file in the directory Myfile = Dir(c:\img\*.*) MyControl.Picture = myfile End Sub Jiri
  14. Solo712

    add image file to a form on open event

    To load the image file into the form control you simply do Me.MyControl.Picture = "c:\img\myfile.gif" where MyControl is the name of the form control and myfile is is the name of your image file. You will need to set the picture property to "" before you zap the file if the form is still open...
  15. Solo712

    Question Which way to go in design

    It's really hard to make a call here without seeing the database and the proposed style of interactions between the offices. If your business model is truly distributed, i.e. almost all transactions happen within the area of local office, then you may be better off keeping the database in the...
  16. Solo712

    Medical Audit database

    Doc, how do you understand the term "complication from a previous episode" and would this mumbo-jumbo include complications that are by nature iatrogenic ? Does "a new admission" mean "next visit" or are we actually talking about successive hospitalizations ? How does complication "become"...
  17. Solo712

    don't open workbook if it is already open

    Hi you should use "GetObject" first which will refer to an existing instance of Excel and create the object only if none is found. Like this: On Error Resume Next Set objXL = GetObject(, "Excel.Application") If Err.Number <> 0 Then Err.Clear 'MsgBox "creating new...
  18. Solo712

    Nz or IsNull Functions

    Hi Pat, generally you would want to check if the passed WHERE argument is null or empty before you send it for execution to a report. You could simply protect against the Null argument by "EmpID='" & Nz(Me.cboFName.Value) & "'" and then in the report check if you have a "No Data"...
  19. Solo712

    Changing control value on subform from main form control

    Have you triedMe.frmServiceContinuity.Form.chkContinueYes.Value = True? Best, Jiri
  20. Solo712

    Extract partial field name to refer to another field

    You could put the buttons inside a frame on the form (eg "frClickedDate") and then extract the value of the selected one in the frame's Click event simply as SelectedDate = "d" & Cstr(frClickedDate) How to set up a frame : https://msdn.microsoft.com/en-us/library/aa241724(v=vs.60).aspx Best...
Back
Top Bottom