Search results

  1. S

    Update query problem

    This errors usually occurs when Access thinks you have duplicate occurances of the record you're trying to update within the query (i.e. the same values get repeated in the query as a result of a join). One thing to try (and do check that the results are OK, if it lets you do it) is to change...
  2. S

    My other question about related forms

    What you need is some way of restricting the information that appears on frmSecond. A couple of ideas: In form one, open form two like this: DoCmd.OpenForm "frmSecond",,,"ID=" & Me!ID Or make the record source for frmSecond into a query (if it isn't already) and include a WHERE clause in the...
  3. S

    Combo Box Selection

    It's because the combo is not bound that this happens. With a continuous form, each instance of a bound control takes the value from the underlying record. With an unbound control, each instance takes the same value (unless it's result is calculated from the values in other controls). Perhaps...
  4. S

    Passing data from a Form to a Report

    Forms and Reports are completely different things - even though they do have quite a bit in common. I agree with you that having an OpenArgs property in a report would be very useful. However as there isn't, here are a few other ideas. Reference the text box explicitly within the query (or...
  5. S

    Section Footnote

    I'm not totally sure why you want them to appear in the footer (if it's just that you don't want to enlarge the detail section, have a look at the CanShrink property in help. However, if you do need them in the footer, your best bet might be to create a subreport. Base the subreport on a query...
  6. S

    Multiple Select list box info to a report

    Not quite sure if this is what you're driving at. Assume a multi-select list box (which you want the bound column from) on a form and a command button which opens a report in preview mode. Here's one way: Private Sub cmdPreview_Click() Dim lst As ListBox Dim vItem As Variant...
  7. S

    list box index values

    Could you be a bit more specific as to what you mean? Also, what ultimate result are you trying to achieve - there may be another route to it? Simon
  8. S

    Simple Report Query? I think not!

    I think something like this should work: SELECT ProductID, [Quantity-In]-[Quantity-Out] AS Balance FROM tblStock WHERE ([Quantity-In]-[Quantity-Out]) < 20000; Simon
  9. S

    Grouping problem?

    If you've got the answers to all nine combos in one record, one solution would be to use just one report, but make a union query to feed it. Something like: SELECT "Gender" AS Category, Gender AS Response, Count(ID) AS Total FROM Job_Details GROUP BY "Gender", Gender UNION ALL SELECT "Ethnic...
  10. S

    DatePart

    Try this formula in either the report or the underlying query: DateAdd("d",-(Weekday([LoadDate],2)-1),[LoadDate])
  11. S

    Remove White Space in Report

    Have you set the CanShrink property on the detail section (or whichever report section the controls are in) as well as on the individual controls? Simon.
  12. S

    Substituting fields on a report

    Here are a couple of ideas: If the query or table that is supplying the report only ever returns either a mailing address or a home address but not both, then superimpose two (sets of) text boxes (one sourced by the home address, one by the mailing address) on the same part of the report. Set...
  13. S

    My Database Reports the wrong size

    I'm not sure whether you mean that Access won't let you compact and repair or just that you don't have sufficient disk space to do so. One solution, assuming you've got some free disk space, would be to create a new mdb and import the contents of the original database into it. You'd need to...
  14. S

    Changing background color on controls

    As an alternative, if you're running Access 2000 or later, you could use Conditional Formatting. In Form Design mode, select the control you want to highlight from the menu select Format -> Conditional Formatting. Select "Field Has Focus" as the condition and then set the appropriate...
  15. S

    Decode ???

    Could you describe what the PL/SQL "decode" statement does? Thanks, Simon
  16. S

    code from menubars

    You can attach a function to a menu command or button. Click View -> Toolbars -> Customise then right-click on the appropriate entry and select Properties from the menu. In the Action property enter =FunctionName() where "FunctionName" is, of course, the name of your function. Simon
  17. S

    Filling in "Frontwise Zeros"

    Use the Format property or the Format function. In the table definition (assuming the data is in an Access table), you could set the format property to 0000. The values in the table will remain the same, but will always be output as a four-digit number, which will include leading zeroes if...
  18. S

    Syntax error with statement in my form when it loads

    I don't know exactly what's causing your error message, but there are a few things in your code example which aren't right, so maybe it's one of these. Firstly, I'm assuming that sSQL is defined elsewhere (as a string or variant) or you're not using option explicit. Secondly...
  19. S

    Unbound controls on form trigger record events

    What about creating a subform to hold the data from the "unbound" table? You could then bind the subform controls to that other table and use the subform's events to trap the various record-related events. The you put the subform on the main form and remove the unbound controls which you've...
  20. S

    #Error if there is nothing to sum

    I can't duplicate your problem in Access 97; the total field on the subform remains blank (the control source is =Sum([FieldName]). However, if I reference that value on the main form, I do then get the #Error value showing when there are no records on the subform. I've found that this works...
Back
Top Bottom