Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnCurrent event property Error

Status
Not open for further replies.

Yam84

Programmer
Jun 5, 2008
26
US

Hello,
I have a form that for some reason is giving me an error. I have had this working for sometime now and it's just now producing this error:

The expressin On Current you entered as the event property setting produced teh following error: A problem occurred while Gate Precast Project Log was communicating with the OLE server or ActiveX control.

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. *There may have been an error evaluating the function, event, or macro.

Here is what is in my On Current event:
Private Sub Form_Current()
' Requery the second combo
Me.cbo_materialID.Requery
End Sub

I am also getting an error asking for a parameter on my subform, but I don't know where the parameter is. I have checked the queries and I can't find it anywhere.

This is causing all types of errors in my form and I don't know how to fix it. I hope my form isn't corrupted; If I ever add any code, I compile and save first...

I appreciate any assistance provided.
 
Typically, if you getting asked for parameters, and you don't have any parameters, you have a spelling mistake in one of your field names.

Check your spelling.

Compiling is always good to avoid corruption.

What is Gate precast project log? Seems like Access thinks it's important, and not doing what was expected.
 


Gate Precast Log is the name of the database.

I am having one thing that might be a spelling issue but I am not sure.

In a query i calculate 2 fields and I call them:DMYield and DDMMixCost

SELECT MixSample.DM_Mix, MixSample.DM_MaterialNo, MixSample.matTypeID, MixSample.materialID, MixSample.matBatchWeight, MatType.matType, Material.material, Material.materialGrav, GetYield([MixSample].[matTypeID],[matBatchWeight],[Material].[materialGrav]) AS DMYield, MixSample.pigPercent, DLookUp("matPrice","MatPrices","materialID = " & [MixSample].[materialID] & " AND matPriceActive = True") AS _matPrice, GetMixCost([MixSample].[matTypeID],[matBatchWeight],[_matPrice]) AS DMMixCost
FROM Material INNER JOIN (MixSample INNER JOIN MatType ON MixSample.matTypeID = MatType.matTypeID) ON Material.materialID = MixSample.materialID;

On my form, I have a text box, whose control source is the DMYield from the query...the text box name is DMYield

I have an unbound text box in the footer that I would like to sum all of the DMYields: =Sum([DMyield])
I am getting a #Error. I wonder if that could be the issue...I have tried using DM_Yield and DMYield and neither works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top