Search results

  1. AlexN

    Solved Percentages combobox

    Million thanks for taking the time to offer a solution. Still, when I input 30, table holds a value of 30 but combo selection becomes 3000%. And, there's always the unwanted extra button (that leads to an unwanted pop up form). Please consider that this thing is a part of a much larger project...
  2. AlexN

    Solved Percentages combobox

    Here's a sample. Feel free to punch me at the face
  3. AlexN

    Solved Percentages combobox

    @Minty , @gemma-the-husky , @ebs17 you guys are gurus Still I get a type mismatch error when I'm trying to add a new value via the combo's NotInList event, wtf am I doing wrong
  4. AlexN

    Solved Percentages combobox

    as soon as I get a solution I'll come back with it. Meanwhile, should anyone be quicker please post. Thank you all, you've been helpful.
  5. AlexN

    Solved Percentages combobox

    Thank you for the code provided. I see what you mean. Still though, I can't see the purpose of using currency as Format Type of the field. I think that adding a new value leads to error because of the Field size property (single, double, long integer etc) and not the format. On the other hand I...
  6. AlexN

    Solved Percentages combobox

    That's what I'm going to try. Thank you.
  7. AlexN

    Solved Percentages combobox

    just read your edit. I think we're getting on the same path somehow.
  8. AlexN

    Solved Percentages combobox

    :ROFLMAO: thank you but...45 becomes 4500%. Ok I get the point though. Maybe it's a bit more complicated that I initially thought it would be, and some extra lines of code are needed. Maybe that table should have two fields, one decimal for the calculations and another percentage to feed the combo.
  9. AlexN

    Solved Percentages combobox

    Of course we don't care how that number would look in the table. We only care of its appearance on the entry form. Still though, that causes a problem on adding new values, since the combo draws values from that table.
  10. AlexN

    Solved Percentages combobox

    Let's say these values could be VAT factors for a variety of products. These days different products get different VAT factors, or, even a single product's VAT factor can change to a new one for a time period. So every time a new product is added a new VAT factor could be in need.
  11. AlexN

    Solved Percentages combobox

    thank you @arnelgp but this doesn't comply with my needs I don't want an extra button, I want it to be done via code under the NotInList event. I also want the user to only type a number Let's say we want to add 6%, user should have to simply type 6 (neither 6% nor 0.06).
  12. AlexN

    Solved Percentages combobox

    Well, right now percentage field's properties in the table are Field Size = Double, Format = Percent, Decimal Places=2. That field is going to be used on some calculations (as a percentage) so I feel its value shouldn't be a string(text). Or could be? The big problem is adding new values to it...
  13. AlexN

    Solved Percentages combobox

    Hi again. Here I am trying to work with a combobox in a form that picks percentage values from a table. Questions: What data type should the percentage field in that table have? How I could add new values to that field on the NotInIist event of the combo? (I know how to do it with everything...
  14. AlexN

    Solved Counting days from multiple date periods

    Ah boy! That's great! You've done it! I knew I've come to the right place, asked the right people. Thank you all so much @ebs17 , @Gasman , @arnelgp Problem Solved Thanks again
  15. AlexN

    Solved Counting days from multiple date periods

    Trying for almost a week. Still no clue of what's missing. Meanwhile my brain is now like yoghurt, no fresh ideas. That's why I'm busting your balls 🤣
  16. AlexN

    Solved Counting days from multiple date periods

    The logic for this is the following: If Rental duration is all in a single season things are easy. User picks a rate between min and max values and closes the deal. If Rental duration exceeds one season, user has to easily know, how many days rental lasts for the first season and how many days...
  17. AlexN

    Solved Counting days from multiple date periods

    thanks, yeah that's the way it should somehow be, but data is wrong. In RendalID =2 subform has to have two records (cause it's going through 2 seasons) and in RentalID=3 subform should have 3 records (cause it runs through 3 seasons). Only RentalID=1 is right. Thanks
  18. AlexN

    Solved Counting days from multiple date periods

    Found this code to automatically fill with the desired number of dates the existing tblCalendar: Public Sub addSeqDates(dateFldName As String, tblName As String, recordsToAdd As Integer) Dim maxDate As Variant Dim strSql As String Dim i As Integer maxDate = DMax(dateFldName, tblName)...
  19. AlexN

    Solved Counting days from multiple date periods

    Filled a tblCalendar with dates from 01/01/2021 to 31/12/2040. Then ran this query. Got this: This is not what I want, and it's wrong. In the attached sample, RentalID =3 lasts through 3 different seasons, as they are defined in tblSeasons. It's SeasonID(5) (from 15/12/22 to 31/12/22, 16...
  20. AlexN

    Solved Counting days from multiple date periods

    I don't think linked excel sheet is the best way. That means that every time dates reach the last one, user would have to open excel, refill the sheet with new dates and so on, provided user has excel installed and knows what to do. I'll try @arnelgp's method as soon as I find it, and I'm not...
Back
Top Bottom