| |
| |
|
Courses - Microsoft
Access 322 |
| Description: |
Advanced Access
Recordsets |
| Running Time: |
81 minutes |
| Pre-Requisites: |
Access 321 very strongly recommended |
| Versions: |
|
We use Access 2003 in this course,
but most of the lessons are valid for all versions of Access from 95 to 2003.
There are cosmetic changes in Access 2007. Order before 3/14/2010 to
get a FREE upgrade to our 2007 version when released!
|
|
|
|
|
| |
|
Full course details with screenshots coming soon.
Access 322 - Course Outline
1. Recordset Tips, Part 1
Recordset Options
- dbAppendOnly
- dbDenyWrite
- dbDenyRead
Record Locking Options
- dbPessimistic
- dbOptimistic
RecordCount Not Working
- dbOpenTable: OK
- dbOpenDynaset SQL: OK
- dbOpenDynaset Table: NOT OK
- dbOpenSnapShot: NOT OK
2. Recordset Tips, Part 2
Seek Method
Must Be Indexed Field
Limitations of Seek
CancelUpdate Method
3. Opening a Different Database
OpenDatabase Method
Reading One Value From Multi-Select Box
OnDoubleClick - Which Is Selected?
Reading Records From A Different Database
OpenDatabase
4. Fields Collection
Displaying All Field Values
Showing Field Properties
Fields Collection
Type of Data
Using the FieldName as a Variable
rs(FieldNameVar)
5. Project: User Logon, Part 1
Why I Don't Like Access User Level Security
Create a User table
Create a Logon form
Password type Input Mask
Recordset to Check Password
Default Command Button
6. Project: User Logon, Part 2
Create a Log table
LogIt function
With, End With
Make LogIt a Global Sub in a Module
Global Variables
Global CurrentUserID, CurrentUsername
Cancel a Form OnOpen Event
|
|
 |
Huge Discounts Available
When you purchase multiple classes together
Huge savings up to 50% off! Order Now. |
|
| |
Student Interaction:
Microsoft Access 322
|
Richard on 1/1/2008:
Recordset options, seek, OpenDatabase, Fields collection, User Logon Form, create a Log table |
|
Harry Mullin on 3/5/2009: Suggestion: when needing to locate a file with an exact path where the file is in the SAME folder as the currentdb, use -
Set db = OpenDatabase(CurrentProject.Path & "\Orders.mdb") |
|
Harry Mullin on 3/5/2009: General Access question - the default indent spacing in code window does not match the tab setting. Hence, wizard created code will set its indents at a different place than hand typed code using the tab key or indent button.
How can the two be sync'd? |
|
Richard Rost on 3/6/2009: Harry, in the VB EDITOR go to Tools > Options and on the Editor tab you'll see "Tab Width" which is where you can specify the size of your tabs (4 characters is the default). |
|
Harry Mullin on 3/6/2009: I have a form whose record source is a query and it is filtered by a Primary Key. I'm using an UPDATE SQL statement to add information to a field (can't do it directly as the query won't allow edits (Totals are on).
When I .requery the form, the filter goes away and other data appears. Is there a way around this?
Adding:
Forms!ChitListF.Filter = "[EvDtID] = " & Forms!ChitListF.EvDtIDtxt
Forms!ChitListF.FilterOn = True
doesn't work. |
|
Harry Mullin on 3/6/2009: Forum question:
Is there a way to review all comments for a group of lessons (eg Advanced Recordsets) without worrying about which specific lesson one is in? I got your comments back on my questions, but now can't find them easily.
|
|
Richard Rost on 3/9/2009: Harry, instead of using a filter, change the RecordSource of the form with a dynamic SQL statement like I show in Access 311 (Dynamic SQL Form). Personally, I hate filter. They work for VERY basic criteria only. |
|
Richard Rost on 3/9/2009: Harry, go to the page on my web site for that course. At the very bottom of the course description/outline you'll find ALL of the student comments (and my replies) for the entire course. For example, Access 322 is at http://www.599cd.com/site/courselist/access/access322. You can also find it by clicking on the COURSES link on the main menu of the web site. Courses > Microsoft > Access > 322. |
|
BRYAN binkerd on 5/26/2009: time of class 04:54, I am using Access 2003 front end with SQL Server Express 2005 Backend. I found the hard way that in order to access the SQL server backend through DSN(ODBC) connection that the OpenRecordset("CustomerT",dbOpenDynaset,dbseechanges) had to be in place due to an error message stating that I was accessing a sql server table with an identity column. (error 3622)
Thought maybe that bit might help.
Thanks
Bryan |
|
Richard Rost on 5/27/2009: Bryan, thanks for the update. I don't have SQL Server 2005 Express here, so I would have never caught that. |
|
Ray McCain on 10/1/2009: I am getting a "From" error in the following item:Set rs = db.OpenRecordset("SELECT * From UserT where Username='" & UserName & "' and Password='" & Password & "'")
Apparently the username is getting set to the username field but the password is not getting set to the password field.
What am I doing incorrectly? |
|
Richard Rost on 10/2/2009: Ray, your SQL code looks fine. Check your field names and make sure they match your form fields exactly. This is usually caused by a misspelling of field name. |
peter jansen on 2/23/2010: Dear Richard how can I use
a wildcard in the DAO seek method?I mean instead of choosing 5 I can choose any other value without changing it in the code.
Thanks.time index 2:38
Reply from Richard Rost:
Sure. I put in a "5" just as an example. You could substitute a variable or a form field there if you want to.
|
|
|
| |
| |
|
You may want to read these articles from the 599CD Blog: |
|
| |
|
 |
| |
| Do you have
questions about
Word, Excel, Access, Web Design, or computers in general? Just
ask us anything you'd like.
Click here
for assistance. |
|
|
|
|
|
| |
|

CLICK HERE for a FREE
lesson |

Order
your first 599CD course now.
Your Satisfaction is Guaranteed!
|
|
|
|
|
|
| |
|
|
|
|