• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

No data from combo box

Experts,
In my form I have a combo box where the row source is based upon this query:
SELECT DISTINCT tblStore.StoreNumberID, 
tblStore.StoreNumber, "# " & [StoreNumber] & " "
 & [StoreAddressOne] AS Store,
 (Select tblEmployee.EmployeeFirstName
  FROM tblEmployee
 INNER JOIN tblDesignatedEmployee  
ON tblEmployee.EmployeeID = tblDesignatedEmployee.EmployeeID Where tblDesignatedEmployee.StoreID = tblStore.StoreNumberID
 And tblDesignatedEmployee.EmployeeTypeID=1) AS
 DistrictManager, (Select tblEmployee.EmployeeFirstName 
 FROM tblEmployee
 INNER JOIN tblDesignatedEmployee 
 ON tblEmployee.EmployeeID = tblDesignatedEmployee.EmployeeID
 Where tblDesignatedEmployee.StoreID = tblStore.StoreNumberID And tblDesignatedEmployee.EmployeeTypeID=2) 
AS StoreManager, (Select tblEmployee.EmployeeFirstName
  FROM tblEmployee INNER JOIN tblDesignatedEmployee ON 
 tblEmployee.EmployeeID = tblDesignatedEmployee.EmployeeID Where tblDesignatedEmployee.StoreID = tblStore.StoreNumberID 
And tblDesignatedEmployee.EmployeeTypeID=3)
 AS AssistantManager, (Select tblEmployee.EmployeeFirstName
  FROM tblEmployee 
INNER JOIN tblDesignatedEmployee
  ON tblEmployee.EmployeeID = tblDesignatedEmployee.EmployeeID
 Where tblDesignatedEmployee.StoreID = tblStore.StoreNumberID
 And tblDesignatedEmployee.EmployeeTypeID=5) AS AreaSupportManager
FROM tblStore;

Open in new window

In my form I have 4 text boxes that receive data from the above query as follows:
=[StoreID].[column](3)
=[StoreID].[column](6)
=[StoreID].[column](4)
=[StoreID].[column](5)
I get the data I'm looking for in the first text box but nothing in the other three?
0
Frank Freese
Asked:
Frank Freese
  • 3
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:
did you set column count property of the combo box to at least 7
0
 
mbizupCommented:
Shouldn't it be like this according to your four column select statement?


=[StoreID].[column](0)
=[StoreID].[column](1)
=[StoreID].[column](2)
=[StoreID].[column](3)

0
 
mbizupCommented:
You only have four columns selected, but you are referring to columns higher than that.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
Rey Obrero (Capricorn1)Commented:
the query you have above will show 7 columns

StoreNumberID      StoreNumber      Store      DistrictManager      StoreManager      AssistantManager      AreaSupportManager

so you need to set the Column Count property of the combo box to 7

0
 
Rey Obrero (Capricorn1)Commented:
see this, look at form "frmBonusEarned" combo storeid
StoreBonusRev.mdb
0
 
Frank FreeseAuthor Commented:
you nailed it capricorn - I forgot to change the number of columns. Everything is ok. thank you
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now