Search results

  1. Cosmos75

    Running Sum resetting each year

    Just a suggestion, you may want to reconsider using DSum() and use a SELECT subquery instead. It should be much faster than using DSum(). See the following article - Running (or moving) Calculations (Sum/Total, Count, Average)
  2. Cosmos75

    Rolling Sum

    Say I have this table. tblData MyDateField (Date/Time) MyValue (Long) To create a sum of the current record and all previous records that are withing the past 4 days, for a total of 5 days, you can use correlated subqueries to do somethinig like this. SELECT tblData.MyDateField...
  3. Cosmos75

    form check box

    Use the AfterUpdate Event of CheckBox1 Private Sub Check0_AfterUpdate() Me.Checkbox2 = False 'Or True Me.Checkbox2.Enabled = Me.CheckBox1 End Sub You can delete this line, if you don't need to set a default value for CheckBox2 Me.Checkbox2 = False 'Or True
  4. Cosmos75

    Piano

    My wife and I met because I play the guitar. She wanted me to hear me play a song that she liked. Her friend had told her that I know how to play it and introduced us. :cool:
  5. Cosmos75

    Change the Colour of a TextBox / Field depending on it's value?

    Curious, I'm glad that the article and sample were helpful. And thank you for posting back to let me know. It is very gratifying to know that the time I spent writing the article and creating the sample wasn't a waste. :cool: :eek: :o
  6. Cosmos75

    Function to concatenate values into a string based upon criteria

    Try this. DConcat function - Concatenating field values for records matching a query's GROUP / SORT BY or WHERE clause . (old link). It shows you how to return ID | Clubs ------------- 1 | Club1, Club6 2 | Club3 3 | 4 | Club1, Club3 But you could alter the code to filter out certain values...
  7. Cosmos75

    Multi-color in List/subform/...

    If you are talking about a record in a continuous form (not in datasheet view), you can use conditional formatting, but you are limited to 3 conditions and is only available for Access 2000 and higher. So if you have Access 2000 and 3 conditions is enough, great! But if you need more, you...
  8. Cosmos75

    Multi-color in List/subform/...

    If you are talking about a record in a continuous form (not in datasheet view), you can use conditional formatting, but you are limited to 3 conditions and is only available for Access 2000 and higher. So if you have Access 2000 and 3 conditions is enough, great! But if you need more, you...
  9. Cosmos75

    Going to Japan!

    Vassago, Congratulations to the both of you! :) Can't wait to see the pics!
  10. Cosmos75

    Conditinal formatting for control (continuous forms)

    Why do you need 6 buttons for each record? What do they do? Why cant you have 6 buttons in the form's footer or header and have them perform an action for the currently selected record? You could disable and enable them depending on the current record meeting certain condition. :confused...
  11. Cosmos75

    Referring to Variable in Code

    ByRef / Using a Collection I was going to suggest an array but Sergeant beat me to it. But since I've already thought about it, I may as well share the other two ways I thought of. The first version is creating a formula that passes all the variables you want to change for a function by...
  12. Cosmos75

    Change Colour Dependant On Field Value

    As ansentry has already said, you can use conditional formatting (Access 200 and higher only) but you are limited to only three conditions. If you need more than that, try this link - 'Conditional Formating' of controls in a continuous form Hope that helps! :) EDIT: Cool! I just realized...
  13. Cosmos75

    Change the Colour of a TextBox / Field depending on it's value?

    Curious, Hopefully, I did a good enough job of explaining it but if not let me know if you need any help figuring it out and I'll try my best to respond quickly. Good luck! :)
  14. Cosmos75

    seperate date and time fields

    supmktg, Glad to be of help! :)
  15. Cosmos75

    seperate date and time fields

    Assuming you have the following two fields, dtDate (Date, e.g. 6/12/2006) and dtTime (9:00:00 PM), you can do the following. dtCombine: DateSerial(Year([dtDate]),Month([dtDate]),Day([dtDate])) + TimeSerial(Hour([dtTime]),Minute([dtTime]),Second([dtTime])) There may be a better way...
  16. Cosmos75

    Change the Colour of a TextBox / Field depending on it's value?

    After reading this thread, I started thinking about how this could be done and worked up a sample and article. 'Conditional Formating' of controls in a continuous form If anyone has any suggestions on how to improve it, the article and sample files, please feel free to email me. Or if you...
  17. Cosmos75

    Change button image (builit-in images)

    I am using one of the builit-in images available through the 'Picture Builder' on a command button. Is there a way to change the button picture to another image available through the 'picture builder' using VBA? In the properties, it says Picture = (bitmap) regardless of which image I select...
  18. Cosmos75

    Call VBA Code From Right Click Menu:

    Custom Right-Click Menu Hope that helps! :)
  19. Cosmos75

    Concantenating records within a single column

    Here's one way to concatenate fields from multiple records- DConcat function - Concatenating field values for records matching a query's GROUP / SORT BY or WHERE clause . (old link).
  20. Cosmos75

    Query for Lowest 2nd lowest and 3rd lowest value

    What is your table structure like? It sounds like your table is as follows; tblData Product (String) COmpanyA (Number) - Company A's price COmpanyB (Number) - Company B's price COmpanyC (Number) - Company C's price If so, you can use three queries. qryPriceData SELECT Product, CompanyA as...
Back
Top Bottom