Search results

  1. R

    How to display Decimal places using VBA

    Check out this sample from Allen Browne http://allenbrowne.com/func-DAO.html#StandardProperties which utilizes his SetPropertyDAO on the same page (just above).
  2. R

    Customized demo counter module from MSDN

    Thank you! I see I didn't get a say in the process ;)
  3. R

    Possible to print frozen panes from excel?

    When you have the cursor within the Word table, then in the 2007 version, in the layout Ribbon, Data Group, there's a button called "Repeat Header Rows". In the previous versions, it is of course much easier to find, it's just below the middle of the table menu.
  4. R

    Alter Table Yes/No Formatted Field

    You can't set such properties through DDL, DAO will work, perhaps it can be done through ADOX, but I don't know. Here's a discussion from a newsgroup. http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/6964a5f95c0e76d7/
  5. R

    Customized demo counter module from MSDN

    If I understand correct, it seems you alredy have a year column, then it should be easy (don't use year as a name, btw, as it is a reserwed word) ...WHERE MyMonthNo = " & Month(Me!SampleDate) & " AND MyYear = " & Year(Me!SampleDate)) where you keep the month counters per each year. At some...
  6. R

    Reserved Words in Access

    Here are lists of reserved words in Access. You should not use these words as object or field names. Edit: list of reserved words http://support.microsoft.com/kb/321266/EN-US/ http://support.microsoft.com/default.aspx?scid=kb;en-us;286335
  7. R

    Customized demo counter module from MSDN

    I think I would try the where clause, and open the recordset with only the relevant record (counter for the correct Month). It could look something like this. Set MyTable = MyDB.OpenRecordset("SELECT NextAvailableCounter FROM CounterTable WHERE MyMonthNo = " & Month(Me!SampleDate)) The reason...
  8. R

    Need help for date related query

    I think one additional challenge here, is how the Jet engine expects dates. I think you will need either a US date format, or another unambiguous format, for instance ISO 8601 (which is "yyyy-mm-dd") For more info, have a look at this article by Allen Browne http://allenbrowne.com/ser-36.html...
  9. R

    Recordset Field Name

    No, I don't think that is the problem, Gemma, they are all valid ways of referring to a field in a recordset by it's ordinal position. It's easy to try, take any table. dim rs as dao.recordset dim x as long set rs = currentdb.openrecordset("mytable") do while not rs.eof for x = 0 to...
  10. R

    Recordset Field Name

    I think that error might be explained by Access having a hiccup over which library to use. In some versions, both ADO and DAO are selected as references, and then, when declaring something As Recordset, will make Access select the one highest in the reference list. Even if they share the same...
  11. R

    Recordset Field Name

    I don't understand. I thought both things you're saying doesn't work, should work. Could you post the code you're using and the error messages? When looping the fields collection, remember it's indexed starting from zero, which means you need to stop at rs.fields.count-1.
  12. R

    Add Autonumber

    <grin>is this what they call the natural vs surrogate debate?</grin>
  13. R

    Highlighting only Rows that meet Conditions

    So, it may also be Null, for instance nz? If Month(nz(Me![LAST UPDATE])) = month(Date) AND _ year(nz(Me![LAST UPDATE])) = year(Date) then
  14. R

    Date Format for the VBE

    <grin> When you get there, here's a link with some explaining http://allenbrowne.com/ser-36.html
  15. R

    Highlighting only Rows that meet Conditions

    Well, does the field you question contain the month numbers (1-12) and how many records do you have for June? Or, was it a date field? Month(Me![LAST UPDATE]) = month(Date) If so, you'll probably need something to exclude previous years too? If Month(Me![LAST UPDATE]) = month(Date) AND _...
  16. R

    Date Format for the VBE

    Don't you pass dates to dynamic SQL strings? If you do, then you should be aware that dd/mm/yyyy gives funny results, so I doubt you're using dd/mm/yyyy everywhere else ;)
  17. R

    Date Format for the VBE

    Would it be impolite to ask why you think you need a specific format in VBE? If you need to hardcode dates, I would recommend the DateSerial function, which, as long as you pass the correct values, will work regardless of locale. I think the VBE date and number format is US regardless of...
  18. R

    Highlighting only Rows that meet Conditions

    Replace Me!txtMyControl = "somevalue" with Me![text 35] = Month(Date) The report (and form) sections can be named by the developer, and are also subject of locale variations. Where I reside, the Detail section, is usually called Detalj. Using Me.Section(acDetail)... which uses a constant...
  19. R

    Highlighting only Rows that meet Conditions

    Yes, it should. If you have specific questions, feel free to post them.
  20. R

    Regular expressions: how to find several matches?

    Sorry, greedy/lazy probably doesn't come into play at all due to using word boundaries. I was playing with different suggestions, and forgot. "\b\w+\b" would probably do. Using * over + - with * (zero or more occurances) it will possibly find word boundaries whith zero /w characters between...
Back
Top Bottom