Search results

  1. stopher

    TempVars

    The late ChrisO would always don't take things you read for granted. Test them and prove them yourself. The following code will error with runtime error 9 (I have assigned myGbl as public elsewhere): Dim a(1) As Integer myGbl = 30 MsgBox "value of global before error = " & myGbl...
  2. stopher

    changing label text when using different button on form

    The code that opens the form (docmd.openform) includes an argument option called OpenArgs. This is just a string that gets passed to the form and you can refer to this value in the form. So pass an value for OpenArg (depending on what you want the title to be. Then in the On Load event of the...
  3. stopher

    How to use an unbound combo box to fill fields of a subform

    I think you need to explain more about what you want to do. What are the values in the combo? What fields do you want to fill in in your sub form and with what? i.e. where does the data come from that you are putting in the fields. But in principle you can create an after update event on the...
  4. stopher

    Sequential Date Field

    That's the way I'd go. It is simple and takes seconds to set up. Ten years of dates is only a few thousand records so don't worry about space.
  5. stopher

    using Multiple dlookups

    Is txtID a text field or a numeric field? Is Procedure Name a text field or numeric field? What are you really trying to lookup? Do you have example of the data?
  6. stopher

    how to remove 's' from text

    Yes, just use the replace function in an update query. The example I gave replaces "https" with "http". The think is if you simply try to get rid of the "s" then you will lose the "s" from other parts of your text also.
  7. stopher

    how to remove 's' from text

    The replace function will replace text in a string with some other text: Replace("http","https",[myLink])
  8. stopher

    using Multiple dlookups

    looks like you want to use the second dlookup as part of the string criteria for the first lookup? Is that right? In which case, try: timevalproc = DLookup("[Haircut Time]", "tblEmployee", "[Employee ID] = '" & [txtID] & Dlookup("[Procedure Name]","tblProcedure", "[Procedure Name]= '" &...
  9. stopher

    Access 2007 subdatasheet form to Visual Studio 2015 VB Windows Form App

    The solution you provided is a datasheet form as the main form and then a continuous form as the subform. vb.net does not have sub forms as such. If you have the budget then you could use a 3rd party tool such as flexgrid (approx $900 for the activex version) which gives you mind-blowing...
  10. stopher

    Calendar display on a form?

    Thanks for the feedback. I've corrected the arrows (doh!). I've also added some more comments. I'll try and write a better overview of how it all fits together particularly the part that each of the three classes plays. I suspect the op needs to go with one of the other solutions. They all...
  11. stopher

    Calendar display on a form?

    I did an example of a "data grid" here. I used it to show data in a tabular row/column fashion rather than just row. It work like IssKint and sneuberg describe in post 2 & 3. Due to the nature of the design you can pretty much code whatever you want to do with the "cells". You can get round...
  12. stopher

    Crosstab Query with more than one column header

    You can try summing the value fields and do Max on the remarks field.
  13. stopher

    entry data from datasheet using vba code

    I posted an example here, post #7 which might be of interest. Also look futher down the same thread at a post by MarkK (post #13). You will need good VBA knowledge.
  14. stopher

    Count number of non sequential number of days

    Here's another alternative to arnelgp's perfectly good answer =SUM(IF(FREQUENCY(A1:A5,A1:A5)>0,1)) Source: https://support.office.com/en-gb/article/Count-unique-values-among-duplicates-7889942d-824e-4469-893c-191d1efde950
  15. stopher

    Average time between purchase orders

    How do you get the results from the supplied data? Take 1111111 for example. The difference in months between each date is 18, 23 and 16 months respectively. So the average is around 19months. How do you get to 5.5? As an aside, you don't need to calculate the difference for each order. You...
  16. stopher

    Why won't this work..?

    .value isn't necessarily the current contents of a control. So what happens if you change .value to .text? Also, what other code do you have? Can you post it.
  17. stopher

    Does not contain any as criteria

    Change CJ_Londons query to Like instead of not like. This will give the phrases that DO match. Then use this as a sub query on the phrases table to exclude the matched list i.e a left join where no match.
  18. stopher

    Make tab visible using vba

    You can also refer to the page names directly rather than via the tab control reference once you've named them sensibly. So to reference the page called pgUpdates as: me.pgUpdates.Visible=True You can do this because each page on a tab is also a member of the form's control collection. Hence...
  19. stopher

    Passing Access constant as argument

    Afaik, Access has no knowledge of VBA constants. So if you try to use acLast in the form designer screens then Access will assume you are referring to a field name.
  20. stopher

    Upgrading from access 2010 to access 2016

    I'm using Office 365 and Access 2016 any noticeable difference from previous versions. I can certainly store millions of records in normal accdb files. Not had any issues with any code and I have plenty of that.
Back
Top Bottom