Search results

  1. G

    querydef execute error: expected function

    Hi - Try this: strQuery = "qryEmailGenerate" Set db = CurrentDb Set qdf = db.QueryDefs(strQuery) qdf.Execute txtStatus = "Number of email recs: " & qdf.RecordsAffected & vbCrLf hth, - g
  2. G

    Report for One Record

    Hi Dave - Your basic approach should be correct, there must be something not quite right in the details. 1. Verify that the text box on the form is really called ClientID (not just the label for it - I've done that more times than I care to admit.) 2. Try inserting a message box after the...
  3. G

    Average

    Hi Athena - welcome! Probably the easiest thing to do is to create a second query that uses your first query as the basis. (I.e. the same way that you based your first query on a table, you can base another query on your first query). In design view for the new query, hit the totals button...
  4. G

    Updating specific fields in table

    Hi - and welcome! All of the things that you describe can be done. If you are new to Access (and new to programming in Visual Basic) then some of it may be a bit complicated to start with. 1. Displaying Book Info The easiest way to transfer data from one form to another is to get the data...
  5. G

    Graph datasheet - Series By Column property

    Hi Pan - Look at the PlotBy property http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbagr11/html/grproPlotBy1_HV03077576.asp hth, - g
  6. G

    Disable calendar dates

    Nice job! Thanks for posting your solution for others to see.
  7. G

    Tavular SubForm confusion

    hi - welcome! It sounds as though your forms are not linking the records properly and when you think that you are moving through records, you're staying on the same one. It is a little hard to say what the correction is, without some additional information. How is your data stored? In...
  8. G

    Field values based on user selection in combo

    Hi - and welcome! The technique that you are looking for is generally referred to as cascading combo boxes. See this thread for some more explanation. http://www.access-programmers.co.uk/forums/showthread.php?t=97680 Post back if you still have questions, - g
  9. G

    Problem with calculating days between dates

    Hi - As tempting as it often is, there are good reasons NOT to store values in tables. If the underlying data ever changes, then the "calculated" item would not be correct. The best approach would be to make a "preliminary" query that contains all the information that you need. Then just...
  10. G

    Form field using query resluts

    hi jamphan - The usual approach relies on some Visual Basic. You can use the AfterUpdate even for each combo box to check what data is selected and build a query using the data. Check out this thread http://www.access-programmers.co.uk/forums/showthread.php?t=98061 for some of the discussion...
  11. G

    Adding controls dynamically

    Hi - It certainly would be possible to add controls dynamically. 1. You would need to detect when a new SalesDriver is added. If the drivers are only added via a combo box on this form, then you can detect them with the NotInList event. If the SalesDrivers can be added on another form...
  12. G

    Disable calendar dates

    Sorry my example code was a little buggy, but I'm glad that you figured out what I meant (rather than what I said). Your example code includes a "+2" for textbox Text45 (which I assume is supposed to be the month). Not really sure why this is in there and I think that you probably need to...
  13. G

    Query problem

    Hi Todd - I tried to alias all the fields with the same name, but Access won't go for it. The only other thing that I can think of is to do a separate query for each column (PID) and pull the non-blank fields out. E.g. extract all the PID1 records in Query1, all the PID2 records in Query2...
  14. G

    Filter a Filter

    Yes, that is the problem with using Autonumber. The MAX of the revision date may be more reliable. To use the MAX, go to the design view of the query. Hit the Totals sign ("Sigma" looks like a strange E) and then choose MAX for the aggregate function. The other fields may need to have GROUP...
  15. G

    Forum Thread View Hangs on Quick Response?

    Hi - It seems like when I try to post a quick reponse, the web page goes off in the weeds: I hit a "Post Quick Reply" and the forum does include my response. I don't ever get back to the view of the thread - seems to hang indefinitely. I know my response is posted, because I can back up and...
  16. G

    Selecting by Day from Date

    I'll defer to raskew on most of this, but I'll throw out a question. Have you checked your use of the TimeFrom criteria? raskew's example uses the TimeValue function to convert this. I'm not sure what is in your table.
  17. G

    retrieving the right amount of records

    Hi Luuk - My approach for this sort of problem would be to write some VBA code to accomplish this. I think that it would be a better approach for any future work (for example, to be able to change the minimum required timeframe). It depends on your VBA skills, though and you may find it...
  18. G

    Disable calendar dates

    Whoops, my bad. There is a little trick in how to address the controls programmatically.... Dim ctl as Control Dim strNum as String strNum = Right("00" & I, 2) Set ctl = Me("CalDay" & strNum) ctl.Value = DayIndex Note that the Me("control name") is an...
  19. G

    Force ROW heading in a crosstab

    I think the "proper" answer is that you are trying to get Access to work in a way that it isn't really intended. I.e. reporting on records that do not exist. Sounds like you already had the workaround figured out! - g
  20. G

    Disable calendar dates

    Good question. I'll try to explain this coherently ... 1. Calculating the Date for First of the Month. You can get the first of the month through a series of calculations. E.g. suppose that Date1 is an arbitrary date value. It might be the first day, or not. DatePart("m",Date1) returns the...
Back
Top Bottom