Search results

  1. VilaRestal

    Form not working? Expression trouble...

    Sorry carrybag, was asleep. I think PNGBill doesn't like to see IIf as part of an expression either. =IIf([Taxable?]=-1,1.1,1)*[After Discount] To put the expression in a query is a slightly different thing to putting it in a control's control source. In the query window you would have...
  2. VilaRestal

    "Transpose" in the form

    OK, then definitely do it as a subform. First thing is to have code that will add all 168 tests (without results) to a number when a new number is made. The subform will be continuous form view, additions, deletions and filters not allowed, flat, no border, no record selectors or navigation...
  3. VilaRestal

    Composite primary keys

    A good example of WTF code from Microsoft is their sample for modifying the shift key bypass property: http://support.microsoft.com/kb/826765 Note two functions, one for disable, one for enable, both identical except the value they set the property to. I think they must get paid by the line...
  4. VilaRestal

    Composite primary keys

    All this (thread revived) because one person thanked Pat for explaining it. Pat and Galaxiom are rightly saying there's no right way. Slight pros and cons to both methods: Surrogate Key Pros: Only one field to join on (but for a pure junction table that's not an issue: usually not joining on...
  5. VilaRestal

    Form not working? Expression trouble...

    OK, cool. You're welcome.
  6. VilaRestal

    Form not working? Expression trouble...

    :D Expressions in a control's controls source need to start with =
  7. VilaRestal

    Form not working? Expression trouble...

    With the = at the start?
  8. VilaRestal

    Form not working? Expression trouble...

    Yes, the Data tab, at the top
  9. VilaRestal

    Form not working? Expression trouble...

    The control source of the textbox
  10. VilaRestal

    Coding For API

    I'm not sure but if I understand what's going on there, quiting ie will hang up. So, I think you'd have to put a private boolean variable at the module level say: Private HangUp As Boolean Set that to false at the start of the call Change Do DoEvents Loop Until ie.readyState =...
  11. VilaRestal

    Is It Possible To Resequence A DAO Recordset From Within A Loop?

    This is a tricky one. I'm 99% sure you can't move records around in a recordset. Do you mean that, the first time a record is skipped in an iteration it needs to be the first record tested each and every following iteration until it is allocated? If so, then I think you'd have to do something...
  12. VilaRestal

    Form not working? Expression trouble...

    Firstly, make it easier and have them as: =IIf([VIP Discount?],0.95,1)*[After Discount] =IIf([Taxable?],1.1,1)*[After Discount] I would try: delete the second textbox, copy and paste the first and modify the copy's formula to the 2nd.
  13. VilaRestal

    "Transpose" in the form

    Yes but with code: unbound textboxes for the tests and results. If it's for display purposes it would reasonably easy. If it's for editing then getting the changes back into the database (and especially allowing users to enter more tests) makes it more complicated. So these questions first...
  14. VilaRestal

    Choose() with Or

    I think you could do it as: where Choose([Forms]![fdlgCo_Status]![Status],'1','23','4') LIKE '*' & status & '*' or where InStr(Choose([Forms]![fdlgCo_Status]![Status],'1','23','4'),status) > 0 A bit of a bodge but maybe the only way other than where status =...
  15. VilaRestal

    Can anyone solve this

    Not at all, like I said: Me.FiscalYear = Year(Now()) + IIf(Month(Now())>8,1,0) Me.UniqueNumber = 1 + Nz(DMax("UniqueNumber","Table1","FiscalYear = " & Me.FiscalYear),0) Easy so long as the fields (year and the number) are kept separate. They can be displayed together but should be stored apart...
  16. VilaRestal

    Sequence numbering for Inventory System

    Probably not a major consideration here (and I'm not certain SQL Server is actually the back end that's being used - although I assume it is from all the T-SQL code posted). To quote from http://www.sqlservercentral.com/articles/Stairway+Series/72443/, which is a very good article on it...
  17. VilaRestal

    Sequence numbering for Inventory System

    True, but the storage space would be improved and index fragmentation wouldn't be an issue, which could gradually wear down the performance of the indexed text field (with 'numbers' getting reassigned). Most importantly: calculating a new number to assign will be much quicker and easier if the...
  18. VilaRestal

    Sequence numbering for Inventory System

    The thing is, there can be (and often should be) a difference between the 'identifiers' users see (the business key) and the identifier the database uses. Using numbers as keys is far better than using text. SQL can filter and find a number much more quickly than text. I'm not going to...
  19. VilaRestal

    Help with filter on form

    Yes, you don't have to show fields in forms. Go into the form design and delete the textbox bound to that field.
  20. VilaRestal

    What happened to the table relationships in my database

    It certainly seems that way. But that would explain it. Agreed.
Back
Top Bottom