I don't seem to understand why you have Me.Products=Me.Products.ItemData(0) at 
the end of the SQL statement. Is this part of the criteria? 

In addition, if Categories is a text then you need to enclose it in single 
quotes like "WHERE VendorID = '" & Me.Categories & "'". Please note that after 
the equals sign there is a single quote (') and then double quotes (") and 
after Categories there is the ampersand (&), double quotes ("), single quote 
and then double quotes again.

HTH

Liveson


  ----- Original Message ----- 
  From: Michael Van Der Stad 
  To: [email protected] 
  Sent: Sunday, 05 April, 2009 2:48 AM
  Subject: Re: [ms_access] Sum formula not working in the Control Source


  I am having some trouble to just to populate two list boxes vendors and 
products I generate the code, the computer don't like it.

  Me.Products.RowSource = "SELECT ProductName FROM"
  "Products WHERE VendorID= " &
  Me.Categories
  _ "ORDER BY ProductName" Me.Products = Me.Products.ItemData (0)

  can u please help me

  thanks

  Mikevds
  --- On Fri, 4/3/09, L Tumbulu <[email protected]> wrote:

  From: L Tumbulu <[email protected]>
  Subject: Re: [ms_access] Sum formula not working in the Control Source
  To: [email protected]
  Date: Friday, April 3, 2009, 3:29 PM

  Dawn

  You seem to be getting quite weird problems with your database. If the 
formula is in the control footer or the report footer and the control source is 
valid the formula should work i.e. If Num_Unit_Facility_ 01 is a valid control 
source (check the underlying table) and the formula is placed in the 
Num_Unit_Facility_ 01 footer you should get the correct answer unless there is 
something wrong with your Access.

  Looking at your question again you say that you have created the formula in 
the Control Source of your Sum_Num_Unit_ Facility_ 01 field. This is not clear 
at least to me. You place the formula in the control's footer on the report and 
not in the Control Source. Perhaps I don't understand the question.

  Regards

  Liveson

  ----- Original Message ----- 

  From: dawnmahc 

  To: ms_acc...@yahoogrou ps.com 

  Sent: Thursday, 02 April, 2009 19:55 PM

  Subject: [ms_access] Sum formula not working in the Control Source

  Hello everyone,

  I'm pretty new to MS Access. I've created the following formula in the 
Control Source of my Sum_Num_Unit_ Facility_ 01 field:

  =Sum([Num_Unit_ Facility_ 01])

  I'm getting the #Error message. I cannot figure out why this would be 
happening. It seems like this would be the easiest formula in the world.

  Can someone please help me?

  Thank you in advance.

  Dawn

  [Non-text portions of this message have been removed]











  [Non-text portions of this message have been removed]


  

[Non-text portions of this message have been removed]

Reply via email to