VBA

MS Access: A Hack to Print Blank Rows in a Report

This is a way to insert empty or empty-like rows into a list of "seats" that contains not only reservations, but a number saying how many seats a group of people have. If the number is greater than the number of seats, this adds new blank rows for empty seats.

Sub insertBlankRows()
    Dim dbs As Database, qdf As QueryDef, strSQL As String
    Dim rst As Recordset
    
    Set dbs = CurrentDb
    strSQL = "SELECT tblSeats.OrganizationId, [MaxOfSeats]-Count([OrganizationId]) AS Difference, " & _

MS Access:Automatically Requery to Update a Combo Box

In MS Access, when you want a form containing a foreign key, you typically use a combo box that's populated with data from the foreign table. The underlying field is the fkey's value, but the combo box displays another column from that table that is easier for people to read. For example:

The Foo table has an fkey, PeopleID, that refers to the tblPeople table.
TblPeople has a field, Name, that is the person's name - a human comprehensible value.
The frmFoo form has a combo box that's bound to the PeopleID fkey.

Novice's Notebook

This is a repository of "novice" articles, written with the intent of driving more traffic to the site, and getting more ad clicks. It's pretty crass, I know, but the information may be very useful.

Syndicate content