Search results

  1. C

    Automatically emailing a Access report once a week

    Where is the function? Is it in a proper module or inside a form / report's module?
  2. C

    Looping through a recordset

    The VBA recordset stands alone from the form, even if they are based on the same SQL. That's why we were working with a RecordsetClone, it's a clone/copy of the recordset on the form not the form itself. Which record you are currently accessing in the recordset has no relation to which record...
  3. C

    Looping through a recordset

    Again, you are doing nothing to the recordset whatsoever. You are only trying to send & get data from form controls which will completely ignore the rst.MoveNext. If you are not going to do anything with the recordset then there is no purpose in looping through it (except to increase the...
  4. C

    Problem with Max of a date field

    As long as it's not set to group by it, yes. Try adding it back in but change the group by to where (but leave the criteria blank). The point is you want to return the field, but you don't want to do anything with it in the initial query.
  5. C

    Problem with Max of a date field

    What happens if you remove LedgerBal from the query (regardless of whether you need it in the end result). If LedgerBal is not the same across all records for that card number then grouping on that field as well as the card number will return more than one record per card. If it is a static...
  6. C

    Looping through a recordset

    It's .currentrecord, not .record. Sorry. However, you may be right about it not being usable in a datasheet, I never use datasheets myself so it's not something I have come across. In that case I think we will need to go back to recordsets, but lets try a recordset clone: Dim db as...
  7. C

    Problem with Max of a date field

    The first thing I would do is create a query on the transaction table, group by card number, max date. The results of that query should be just the latest transaction on each card. Then create the query you are currently trying to use, but using the new query instead of the transaction table.
  8. C

    Automatically emailing a Access report once a week

    It's been a while since I had to think about Windows file name rules, but is - allowed in a file name? Try changing the -'s to _'s (I know _'s are allowed in file names). I was going to suggest a different location as the comment says it saves to the desktop (which may be considered a system...
  9. C

    runtime error13 type mismatch

    Try this to make sure the SQL statement is actually what you expect it to be: msgbox "SELECT location FROM completed_table where barcodevalue<>'' AND BARCODEVALUE='" & Text0 & "'"
  10. C

    runtime error13 type mismatch

    What data type is BARCODEVALUE?
  11. C

    Looping through a recordset

    If all you are trying to do is set the value of a control based on another control, then there is no need for the recordset at all. You are not getting data from it or writing data to it. Try this: Dim D As String Dim T As String D = Format([CurrentDate], "mm/dd/yyyy") T =...
  12. C

    Looping through a recordset

    The following line moves to the next record in the recordset: RST.MoveNext Assuming the control names references mean what they seem to, I would personally replace the D & T lines with this: D = Format(Now(), "mm/dd/yyyy") T = Format(Now(), "hhnn") This is based on the assuption that thwe...
  13. C

    Display Query on Form

    Sorry, normal is tabbing / cursoring into a field selecting all, but clicking in acting normally. It's too early for my brain to work!
  14. C

    Error 430

    Open the database on the problem PC. Press alt&F11 to access VBA window. Click Tools => References. Check there are no missing references (.dll files) on that PC which the database is expecting to use.
  15. C

    Looping through a recordset

    Check this site (word doc) to see how to pass paramaters to a query in either a DAO or ADO recordset. http://www.utsweb.net/Tips%20and%20Tricks/Access%202003/Parameterized%20Queries%20using%20VBA.doc
  16. C

    Display Query on Form

    I'm fairly sure that it's a standard feature of datasheet mode. Keep in mind you can replicate the look of datasheet mode by carefully making a continuous form. Use the header to add lables for column headers and add a textbox control for each field. Move them so they have no space between...
  17. C

    Question Need to build a database ?

    Firstly, don't store calculated values. You can easily calculate them in a query. Given your example the field would have to be updated whenever the price or quantity changes, with a calculated field in a query it will always be a calculation based on the current price & quantity. Your...
  18. C

    Display Query on Form

    If you want all 3 at once then seperate subforms (or just seperate forms) would seem to be the answer then. In which case you should be able to follow vbaInet's instructions except for hiding the other subforms & setting a filter to hide the results on the hidden forms.
  19. C

    simple problem but turning my hair grey

    References can be checked in the VBA window (alt&F11 - Tools => References).
  20. C

    Display Query on Form

    I agree your suggestion may be better if the user will always want to access all 3 queriy results, however I'm still unsure if the user will often access just 1 query. However, I should make it clear that I'm not trying to argue here, just trying to see why one way is better than the other...
Back
Top Bottom