Search results

  1. N

    Extract field from query results into VBA variable

    another solution could be.... debug.print DLookup("PartID", "qryPartsToStock", "qryPartsToStock.ManufID=" & [Forms]![frmPONumbers]![frmPOItems].[Form]![comboManufacturerID]"& _ " AND qryPartsToStock.ManufPN=" &...
  2. N

    Extract field from query results into VBA variable

    dim rs as dao.recordset set rs = currentdb.openrecordset("yourquery") Debug.print rs!PartID msgbox rs!PartID rs.close set rs = nothing Something along those lines?
  3. N

    Solved Code not working?

    Proper indentation of your IF/else/endif and other places really helps to keep track of where you have what.
  4. N

    Solved Code not working?

    I am guessing that the check for partnumber only is checked when the first check for Value_Stream fails. Proper indentation shows this problem Private Sub cmdSaveEmail_Click() If IsNull(Me.Value_Stream.Value) Then MsgBox "Please select a Value Stream", vbOKOnly, "Warning"...
  5. N

    Solved Generating a report between two dates - vba

    stDateField as your statement is, is expected as a field inside your report. I am guess your field inside your report is "date worked" << PS will ignore the naming problem. Try: stReportCriteria = "[Date Worked] Between #" & stStartDate & "# And #" & stEndDate & "#" Or.... maybe as you...
  6. N

    Dlookup syntax with 3 variables as criteria

    Why use a DLookup at all, what is your goal? D functions have their time and place, but 75% of the time there is a (much) better way of doing things.
  7. N

    Referencing a Column with a Space in VBA

    Most likely its a disconnect in your eyes fooling your brain into thinking .... a small typo somewhere that you were unable to spot txtCertifcateNumber
  8. N

    Custom Number Field

    @Pat Hartman How would deletes be allowed in this case?? Or most any case, surely one would mark records as "obsolete" or "in error" or what not over deleting data.... Agree that DMax will guarantee results better than DCount on the other hand proper data management should be enforced....
  9. N

    Dsum

    Which has been the case since the start of the thread.
  10. N

    Dsum

    Which is why I highlighted where to look instead of putting in all kinds of fixes.... " Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. "
  11. N

    Dsum

    You missed one ;)
  12. N

    Dsum

    Make your code readable, it will help you debug it.... Me.TCMP.value = FormatIndian(Nz(DSum("Chamt" , "total cmp" , " finyear = " & [COMFY] & _ " and section = " & [TXTUC] And "[settelment_date] between [Text0] and [Combo4]"))) With each of the red coloured somethings wrong The blue...
  13. N

    Custom Number Field

    Well 3 fields is a good idea... 2 fields is a good idea, your sequence number and your date field. At the root you only need these 2 fields. Having 3 fields, year, month, sequence is a halfway solution... your still destroying information. (the day part the date) which is generaly a bad idea.
  14. N

    Custom Number Field

    Dont want to knock @arnelgp 's work, his solution certainly does work, but custom keys are worse than bad, make sure you use an autonumber inside your database as the "real" primary key. While @arnelgp 's work works, I disagree with his approach. Because it limits you to 0001 = 9999 returns...
  15. N

    New feature: Top posters of the Month!

    Used for nothing, its braggin rights only. I once wanted to appear on the top posters lists, but I dont post in the watercooler nor on "hello" posts Now a days I dont frequent the forum as much as I used to back in the day. Still seriously believe that Access and Excel are the most underrated...
  16. N

    New feature: Top posters of the Month!

    No one ever remembers me :(
  17. N

    Convert Date into Month and then data of only last two months

    1 you need to simply make an other column to sort on, you format said column as YYYYMM and order by that 2 same as 1, but you keep the original unformatted date and filter by that ... put in the where clause: >= dateserial(year(date), month(date) -1,1) this will make >= 01-aug-2020 for the...
  18. N

    Creating a custom PK with autonumber

    sorry but no no no no no... mixing characters and numbers and expecting proper results.... no no no. Split your columns as per my earlier post, make your own life easier by so many ways ... 4 seperate columns for four seperate needs. KISS Keep characters characters Keep numbers numbers Keep...
  19. N

    Creating a custom PK with autonumber

    Concure with other contributers, use a autonumber inner database key for inner database needs. Compound user keys like this are best of storing in seperate fields, thus in your database use atleast two fields or even three or four fields to store the seperate character part(s), Field 0...
  20. N

    Car insurance - they always up my rate!

    Insurance people Gas and Light people Notary Suveryor (of real estate) Estate planners Investment advisors Pension funds The of "white collar thugs" that will make you overpay for most anything is long
Back
Top Bottom