Combo box shows only populated fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Fields: accountID, Start Quarter, End Quarter

Some accounts have been around since 1992. Other accounts are recent. I
want my period drop down list to pull only those quarters associated with an
accountID. SO -- if Account01 has only been around for three quarters, the
combo box will only list show Q3-2004, Q2-2004 and Q1-2004.
 
Fields: accountID, Start Quarter, End Quarter

Some accounts have been around since 1992. Other accounts are recent. I
want my period drop down list to pull only those quarters associated with an
accountID. SO -- if Account01 has only been around for three quarters, the
combo box will only list show Q3-2004, Q2-2004 and Q1-2004.

On way is to base the Combo on a query referencing the current account
selected on the Form. If the account number field is in the textbox
txtAccountID on form frmAccounts, use a query

SELECT Format([AccountDate], "\Qq-yyyy") FROM Accounts WHERE
Accounts.AccountID = [Forms]![frmAccounts]![txtAccountID] ORDER BY
AccountDate;

adjusted to your table and fieldnames of course.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top