Hide bound column of combo box and access crashes

J

Jeremy

I have a bound form with an unbound combo box. The query behind the
combo returns 6 fields and when I "hide" the first column which is the
bound column, access just crashes and goes away. I have narrowed it
down to if I set the width of the first column to anything other than
zero, it works fine. However, if I set it to zero, then access crashes
when after I select a record from the combo.

I have used this technique before to do things like select a customer
or user. The customer id is bound but is hidden and instead the
customer name is shown in the combo. I am a little confused and think
that this may be related to the query because I have a combo that is
almost identical except it only has 5 fields. Has anybody had anything
like this before? Please help if you have any ideas.

------------
Details
------------
bound column = 1
column count = 6
column heads = Yes
column widths(works) = 0.5";0.5";0.5";0.5";0.5";0"
column widths(crashes) = 0";0.5";0.5";0.5";0.5";0"


query =

SELECT [Products2-Products].ProdCode, [Deliverer] & ' ' &
[ProdNickName] AS Name, IIf([CP]<>0,[CP],[Products2-
Products].ProdPrice) AS Price, [VoucherPull-QIS].Qty AS InStock,
IIf(IsNull([Products2-Products].Mode)=True Or [Products2-
Products].Mode=0,[VoucherPull-MinExp].MinOfExpires,IIf([Products2-
Products].mode=1,IIf(IsNull([Products2-Products].DateOverride)=True,
[VoucherPull-MinExp].MinOfExpires,[Products2-
Products].DateOverride),IIf(IsNull([Products2-
Products].DateOverride)=True,[VoucherPull-
MinExp].MinOfExpires,DateAdd('d',[Products2-Products].DateOverride,
[VoucherPull-MinExp].MinOfExpires)))) AS [Lowest Exp], (SELECT TOP 1
CustomerPriceLevels.CustPrice FROM CustomerPriceLevels WHERE
(((CustomerPriceLevels.CustID)=Forms![Draft Orders]![CustID]) AND
((CustomerPriceLevels.ProdID)=[Products2-Products].[ProdCode])) ORDER
BY CustomerPriceLevels.Date DESC;) AS CP FROM [Products2-Products]
INNER JOIN (([VoucherPull-QIS] INNER JOIN ([VoucherPull-MinExp] INNER
JOIN [Products2-Exams] ON [VoucherPull-MinExp].ExamName=[Products2-
Exams].ExamName) ON [VoucherPull-QIS].ExamName=[Products2-
Exams].ExamName) INNER JOIN [Products2-Junction Products/Exams] ON
[Products2-Exams].ID=[Products2-Junction Products/Exams].ExamID) ON
[Products2-Products].ProdCode=[Products2-Junction Products/
Exams].ProductCode WHERE ((([VoucherPull-QIS].Qty)>0) AND (([Products2-
Products].Special)=True) AND (([Products2-Products].Active)=True))
ORDER BY [Deliverer] & ' ' & [ProdNickName];
 
O

OldPro

I have a bound form with an unbound combo box. The query behind the
combo returns 6 fields and when I "hide" the first column which is the
bound column, access just crashes and goes away. I have narrowed it
down to if I set the width of the first column to anything other than
zero, it works fine. However, if I set it to zero, then access crashes
when after I select a record from the combo.

I have used this technique before to do things like select a customer
or user. The customer id is bound but is hidden and instead the
customer name is shown in the combo. I am a little confused and think
that this may be related to the query because I have a combo that is
almost identical except it only has 5 fields. Has anybody had anything
like this before? Please help if you have any ideas.

------------
Details
------------
bound column = 1
column count = 6
column heads = Yes
column widths(works) = 0.5";0.5";0.5";0.5";0.5";0"
column widths(crashes) = 0";0.5";0.5";0.5";0.5";0"

query =

SELECT [Products2-Products].ProdCode, [Deliverer] & ' ' &
[ProdNickName] AS Name, IIf([CP]<>0,[CP],[Products2-
Products].ProdPrice) AS Price, [VoucherPull-QIS].Qty AS InStock,
IIf(IsNull([Products2-Products].Mode)=True Or [Products2-
Products].Mode=0,[VoucherPull-MinExp].MinOfExpires,IIf([Products2-
Products].mode=1,IIf(IsNull([Products2-Products].DateOverride)=True,
[VoucherPull-MinExp].MinOfExpires,[Products2-
Products].DateOverride),IIf(IsNull([Products2-
Products].DateOverride)=True,[VoucherPull-
MinExp].MinOfExpires,DateAdd('d',[Products2-Products].DateOverride,
[VoucherPull-MinExp].MinOfExpires)))) AS [Lowest Exp], (SELECT TOP 1
CustomerPriceLevels.CustPrice FROM CustomerPriceLevels WHERE
(((CustomerPriceLevels.CustID)=Forms![Draft Orders]![CustID]) AND
((CustomerPriceLevels.ProdID)=[Products2-Products].[ProdCode])) ORDER
BY CustomerPriceLevels.Date DESC;) AS CP FROM [Products2-Products]
INNER JOIN (([VoucherPull-QIS] INNER JOIN ([VoucherPull-MinExp] INNER
JOIN [Products2-Exams] ON [VoucherPull-MinExp].ExamName=[Products2-
Exams].ExamName) ON [VoucherPull-QIS].ExamName=[Products2-
Exams].ExamName) INNER JOIN [Products2-Junction Products/Exams] ON
[Products2-Exams].ID=[Products2-Junction Products/Exams].ExamID) ON
[Products2-Products].ProdCode=[Products2-Junction Products/
Exams].ProductCode WHERE ((([VoucherPull-QIS].Qty)>0) AND (([Products2-
Products].Special)=True) AND (([Products2-Products].Active)=True))
ORDER BY [Deliverer] & ' ' & [ProdNickName];

Try one less field and see what happens...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top