Search results

  1. B

    Report text box: hiding zeroes

    A2003 on Win XP I have a report with text boxes in a Group footer. The source of the data in the Text boxes is something like this: =nz(dsum(...)) Some results turn out to be blanks (which is what I want), but some DSUMs turn out to be zeros. How do I suppress zeroes in the text boxes? 2...
  2. B

    Highlight whole row as cursor moves

    I used to have this code (I think) in my Personal.xls workbook, which means it affected all open spreadsheets. The code doesn't seem to work at all, when I pasted it into my Personal.xls workbook, which is opened every time I restart Excel. I even tried restarting Excel. Got any clue how to...
  3. B

    Randomize but not repeat

    You need to store each generated number in something like an array. Each time you generate a new number, look in your array of stored numbers. If the new number is in the array, generate a new number, otherwise use the new number. I did this in Perl (customer wanted to generate unique but...
  4. B

    Show information ina form

    No it doesn't make sense. Can you post a picture of the form then label the parts of the picture?
  5. B

    Clone a record on a form

    Thank you all. I actually used the code from ghudson's link above and that worked with my subform, even though it doesn't clone the subform records (which is fine with me). For some reason, the button wizard code refused to work.
  6. B

    Clone a record on a form

    I need to duplicate a record, and store the result on the same table as the source record. If my combo boxes are not bound, why would their AfterUpdate events be fired during my clone process? Ghudson, There are about 40 fields on the form/table. I have used my original Cloning code (from...
  7. B

    Clone a record on a form

    I used your code above instead of the Button Wizard code, and the error in cmdClone no longer appears. Now I am getting new errors from cbxPLU_AfterUpdate. I don't know why cbxPLU_AfterUpdate is running during my clone process but it is. The code is this: Private Sub cbxPLU_AfterUpdate() Dim...
  8. B

    Clone a record on a form

    Ok. My initial post was too complicated, because my error trapping wasn't working right. So I edited my first post in this thread. So I took out stuff about my combo boxes. Now look at the cmdClone code. This line: DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 ' Select record gives...
  9. B

    Clone a record on a form

    That line selects the current record to clone. I don't know what the second line does, Access Button Wizard does not add comments. But the third Docmd does a PasteAppend. The error is in the first Docmd, which is trying to select the record. My hunch is, because my form to edit these records...
  10. B

    Clone a record on a form

    I have one "master" table, with 600+ records right now, and I need an edit screen to find and edit each record. The number of "master" records will slowly and surely be increasing. Besides, my whole application is based on records in these tables. I cannot use variables in this case.
  11. B

    Clone a record on a form

    The cloned record will have all the same values as the source record, except for one field. Thus, the record really does need to be cloned. It is a piece of produce that has all the same info except for a PLU.
  12. B

    Clone a record on a form

    A2003 on Win XP I'm made a button using the Button Wizard to duplicate (clone) a record on a form. I have 2 combo boxes used to search for records on different fields. Whenever I clone a record I get errors from the AfterUpdate of these combo boxes. The error is: "3020 Update or Cancel Update...
  13. B

    (Hopefully) simple question!!

    The link given above is accurate but is missing one thing. In the cbxSearch_Enter event put this: cbxSearch.Requery Otherwise your combo box used for searching for a record won't show record changes or new/deleted records. Oops. The code in the link above is NOT accurate and does not account...
  14. B

    Default Values for a Form

    You can have an "Add" button to add a new blank record. Then you can have an "Add with Defaults" button, same code as Add button, but after adding the blank record, fill in defaults for the fields you want. Or you can have a "Clone" button which copies certain fields from the current record...
  15. B

    Count form values

    If you are using a bound form, only one record can be shown on a bound form at a time, so the count is always 1. Am I understanding you correctly? Or, are you counting the records on a subform, which represent detail records linked to the currently shown master or header record? I do that...
  16. B

    How to update "changed date" field on bound form?

    I fixed the problem. I added "Me.Requery" at the beginning of lstFilter_AfterUpdate. This bug is also found when searching for records using a single combo box. New code is: Private Sub lstFilter_AfterUpdate() ' Do stuff when user types in txtSearchString. Dim rs As Object Dim crit As String...
  17. B

    How to delete all the entries in a Subform using a button on the main form??

    ^^ I do what Thinh does above. The SQL is very fast.
  18. B

    How to update "changed date" field on bound form?

    I think my problem is a combination of things. I have a list box called lstFilter. I have a text box called txtSearch. When the user types characters in txtSearch, the lstFilter is filled with the name of products which match the text in txtSearch. When the user clicks on lstFilter the record...
  19. B

    How to update "changed date" field on bound form?

    A2003 on Win XP. I have a bound form. On the table bound to the form, I have 2 fields: ChangedDate which stores the date the record was changed, and ChangeUser which stores the network username of the person who changed the record. In my Form_BeforeUpdate event I put this code: On Error...
  20. B

    Removing dupe detail records

    Yes I am. One of the fields on the Master table is called "Name". When I put the field "Name" in a groupby based on "Name", I still got dupe records. Just to reiterate, I don't want to show any records on the Detail table, but I do have to check them. In the report's query, I also unchecked...
Back
Top Bottom