VBA: Table Record Count

=========REF: http://www.pcreview.co.uk/forums/vba-table-record-count-t1104006.html�http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26940281.html�http://classicasp.aspfaq.com/general/why-does-recordcount-return-as-1.html =========NOTES---------Be careful with the use of CurrentDb.TableDefs("TABLENAME").RecordCount option. It's only available to the system when it is using a certain cursorType in your calls to the database. The default cursorType is Forward-Only and will not show the RecordCount. The best option is to open a record set:     Set rst = CurrentDb.OpenRecordset ("6050c__DrawingWinners")Then check [...]

By |2017-12-01T23:47:52+00:00March 30th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on VBA: Table Record Count

VBA: Time and Date Functions

=========QUESTION: How do I add date  and/or time values to Access queries, VBA, etc...?   =========EXAMPLES:---------Day of the week of a given Date:Day: Weekday([TransDate])Day: IIf(Weekday([TransDate])=1,"Sun", IIf(Weekday([TransDate])=2,"Mon", IIf(Weekday([TransDate])=3,"Tue", IIf(Weekday([TransDate])=4,"Wed", IIf(Weekday([TransDate])=5,"Thu", IIf(Weekday([TransDate])=6,"Fri", IIf(Weekday([TransDate])=7,"Sat","nada"))))))) ---------The current month:DateSerial(Year(Date()), Month(Date()), 1) The next month:DateSerial(Year(Date()), Month(Date()) + 1, 1) The last day of the current month:DateSerial(Year(Date()), Month(Date()) + 1, 0) The [...]

By |2011-03-28T09:27:22+00:00March 28th, 2011|Access, Computers, Documentation, Microsoft, VBA|Comments Off on VBA: Time and Date Functions

Access: All table columns showing in query results

=========Error Message(s):---------Error message when you run a query in Access: "Cannot group on fields selected with '*'" ---------All fields showing in query results even though you only stipulated a few =========REF:---------http://www.pcreview.co.uk/forums/asterisk-automatically-added-end-query-sql-vie-t3283725.html  ---------http://support.microsoft.com/kb/835414  =========ANSWER(S): ---------To resolve this problem, set the Output All Fields property of the query to No, and then run the Access query that [...]

By |2017-12-01T23:47:52+00:00March 9th, 2011|Access, Computers, Documentation, Microsoft|Comments Off on Access: All table columns showing in query results
Go to Top