Recent content by jstutz

  1. J

    Filtering Report Using Dialog Box

    I'm not entirely sure what you are asking. I THINK what you need to do is to: 1) Add the function example I've supplied to code module for your form. 2) Remove any code from your orignal that you were using to create the filter string. In it's place use the function to create the string by...
  2. J

    Refresh data??

    I believe you have to close & rerun the report to refresh the data (ie. switch to Design View & back as you suggested). SHIFT + F9 refreshs data in queries & tables, but does not appear to work for reports. HTH J
  3. J

    Filtering Report Using Dialog Box

    Use a Function to Parse Name string If I understand you correctly, probably the easiest way is to use a function to parse your name string. Below is an example fucntion including a sample input string to the function and what it returns: FUNCTION INPUT: aa,b,c,d FUNCTION RETURNS: [NAME]...
  4. J

    Report sorting

    Use a Union There are possibly better ways to do it, but one solution would be to create two more queries. New Query #1) Use this query to calculate the share of all other records NOT in the Top 5. New Query #2) Create a Union query that joins your initial query (the Top 5) with New Query...
  5. J

    Some Users Can't Open/Add Reports

    I have a baffling problem to run by the group. One of my DB's that has been functioning quite some time has all the sudden has started having problems, namely several of the users can no longer open or add new reports to the DB. Obviously something has changed, but I can't figure out what...
  6. J

    Retrieving value of a combo box.

    Try this: If IsNull(category) Then Me.Combo70.RowSourceType = "Value List" Me.Combo70.RowSource = "Select Category first" Me.Combo70.DefaultValue= "'Select Category first'" me.combo70.requery Else Me.Combo70.RowSourceType = "Table/Query" Me.Combo70.RowSource = "SELECT...
  7. J

    Open Report with DoCmd.OpenReport

    I think the problem is that the WHERE condition is not used to specify the name of a query, but rather an actual WHERE clause from a SQL statement. For example, if you had a table of books and authors, you might come up with the following statement: DoCmd.OpenReport "rptAllDataFields1"...
  8. J

    Most recent in a one-many relationship...

    Thanks... worked like a dream. I knew it was something easy! js
  9. J

    Most recent in a one-many relationship...

    Ok, this is probably very easy, but my brain has taken the day off and I've reached a brick wall. Here's the setup... We have an in-house library that employees can check items in and out of. As items are checked in or out, a database tracks the "movement" of the items. There are three...
  10. J

    Enabled check box

    Although I've never tried something like this, you could in theory squash the questions closer together by setting the Top property for your question in code, which in itself is easy. The code would look like: me!ControlName.top = 1440 'Move this control down 1 inch from the top of the form...
  11. J

    Enabled check box

    If you copy the code from both of your AfterUpdate events and put them in the form's OnCurrent event, each time you switch to a new record, the code should run and hide or show the appropriate controls on your form. The code would look like: ---------------------------- Private Sub...
  12. J

    Enabled check box

    Sorry... I just re-read your post... you need to use the following code in the AfterUpdate Event of your option box: If me.optionboxname = -1 then me!control.visible = -1 Else me.!control.visible = 0 End if js
  13. J

    Enabled check box

    In VBA you can set a control's properties from the same form using code like: Me!ControlName.PropertyName = Value In the case of settings a property to YES or NO in VBA, for YES you can use either vbYes or -1, and for NO you can use either vbNo or 0. I suggest using 0 or -1. So in your...
  14. J

    execute a batch file from command button

    Try this... ----------- Dim str, dimshell str = "c:\batfile.bat" dimshell = Shell(str, 1) ----------- The 1 indicates that the shelled file gets normal focus. Search help for Shell for a full list of options. js [This message has been edited by jstutz (edited...
  15. J

    look up table data from combo box

    IN the AfterUpdate event of your drop down, you could write something like: --------------------- docmd.openform "frmEmployeeInfo", , acNormal,, "[employeeID] = " & me.cmbName with forms!frmEmployee !controlname1.enabled = false !controlname2.enabled = false !controlname3.enabled = false end...
Top Bottom