Search results

  1. G

    number of records?

    Hi - If it is an action query you can do something like is shown in the following thread: http://www.access-programmers.co.uk/forums/showthread.php?t=98643 If it is a select query, then you would need to assign the results to a recordset and use the RecordCount property. hth, - g
  2. G

    Warning Msg box for missing data on a form.

    This can be done, but you are starting to get into another layer of complexity. You can check for duplicates with the BeforeUpdate event for the field. Something like... Dim varData As Variant varData = DLookup(ItemNum, "tblItems", "[ItemNum] = " & ItemNum) If Not...
  3. G

    Warning Msg box for missing data on a form.

    Good work! You can adjust the size of the field with the Height and Width properties. The units are a little complicated, but you can just experiment to see what works. E.g. Me.FAC.Height = 25 Me.FAC.Width = 175 Don't forget to set the height and width back to the correct values (probably...
  4. G

    Warning Msg box for missing data on a form.

    Hi - Take a look at this post and see if it helps. If you still have questions, please post back... http://www.access-programmers.co.uk/forums/showthread.php?t=99765 hth, - g
  5. G

    SQL Round to 2 Decimal Points??

    Hi Daniela - The formatting is something separate from the SQL statement. In the design view of the query, right click on the [CountofStudent Attended] field and select Properties. Set the Format item to Fixed and then the Decimal Places item to 2. hope that helps, gromit
  6. G

    Record Count On each record In Report

    Hi - You could create a query that includes all the existing field for the report, PLUS an arbitary rank for whatever field you are ordering the records by (E.g. last name). To create a query with a ranking you need to create an alias for the table (this sounds worse than it is). As a...
  7. G

    ValidationRule Help

    If the memo field is to been stored at all, then it must exist in the table. You can ensure that it is only displayed, however, when ComboFunction is not null. Use the AfterUpdate event of ComboFunction to check for null, and then toggle the visibility of the txtMemo. Private Sub...
  8. G

    rentals database

    No problem. Hey, I learned something too. Why don't we close off this thread, and you can start a new post if something else creates questions. ;-)
  9. G

    rentals database

    Sergeant posted an easy fix: Change the code for the Pick button to Forms!frmRental!frmCopyRental.Form.Controls("tblCopyRental_CopyID") = Me.lstTitles Seems to take care of the problem!
  10. G

    Entering Field Value with Code Doesn't Trigger New Record with AutoNumber

    Thanks, Sergeant! That's a clean, easy fix. Any insight as to why the control name would be required in some instances, but not all? The NewRecord command was an attempt by the original author to force the generation of the next record. I agree - it is not needed. - g
  11. G

    Entering Field Value with Code Doesn't Trigger New Record with AutoNumber

    In trying to respond to another thread, I have run into something that is confounding me (or maybe I'm just getting dense). We have a subform. One field has an event on DblClick to launch a search form. When the user identifies the target, he/she clicks a button on the subform. This pushes...
  12. G

    rentals database

    If you add a refresh after setting the value in the subform, it will show a new record. E.g. Forms!frmRental!frmCopyRental!CopyID = Me.lstTitles Forms!frmRental!frmCopyRental.Form.Refresh However, it goes to the beginning of the subform, which is not particularly convenient. I can't explain...
  13. G

    Rearrange Row data to Column data for pivot charts

    Glad to help. Probably one of the reasons that it is not more common is that good table design (normalized) generally points to one or the other arrangements. - g
  14. G

    Rearrange Row data to Column data for pivot charts

    hi Bill - Welcome! Yes, you can write a query to generate the transpose (switch row to column). It will look something like this... SELECT Player1, 'Red' As Symbol, 'Yes' as Value1, YesRed AS Count FROM tbllWl_Games UNION SELECT Player1, 'Red' As Symbol, 'No' as Value1, NoRed AS Count FROM...
  15. G

    rentals database

    Man, I'm stumped. The subform definitely acts a little strangely, but I can't see what is different from the example I posted. Perhaps I can take another look tomorrow.
  16. G

    rentals database

    Sounds like progress. 1. I suggested using the subform in continous forms because I don't think you can catch the click event in the datasheet (maybe I'm wrong, so test it first). If you design your subform as a long skinny set of columns, you can obtain something that looks much like the...
  17. G

    Using previous month's "closing" value for this month's "opening"?

    Hi Catherine - I might step back and look how you are structuring the data for this task. Although creating a table for each month may provide you some of the answers that you seek, it can make it very difficult to extract other information (for example, what is the total sales over the course...
  18. G

    rentals database

    Welcome to the cold cruel world of VBA programming! Until you get to a certain point, the error messages just seem mysterious and minor changes cause all kinds of problems. But don't feel bad, everyone has to start somewhere. The message "Microsoft Office Access can't find the field...
  19. G

    Count Function in Query design view

    The type mismatch is coming from the highlighted part of the SQL statement: SELECT [Promo count].PromoNo, [Promo count].[# of Demos], Count(DemoOrder.Status) AS CountOfStatus, [DemoOrder]![Status]/[Promo count]![# of Demos] AS Percentage FROM [Promo count] INNER JOIN DemoOrder ON [Promo...
  20. G

    Count Function in Query design view

    GATJA - I have just tried duplicating the SQL syntax using some mocked up tables. It seems to work okay (although I doubt my table syntax is exactly the same). Take a look at the attached and see what the difference might be. Selena - I'm not fully conversant with the distinctions between...
Back
Top Bottom