You have to assign the value to a variable, e.g.
intCount = intCount - 123
mfG
--> stefan <--
I'm not quite sure what that means. Is that something that I need to type at
the beginning of the code? Also I ran into another error at the
Me.cboBannerLabel, I'm going to assume that since it stopped at the first one
that all the rest of them. Any ideas?
Private Sub cboBannerLabel_AfterUpdate()
Me.txtReportName = DLookup("[Report Name]",
"[tblAMUDailyRptsMatrix]", "[Banner Label]='" & Me.cboBannerLabel & "'")
Me.txtJobName = DLookup("[Job Name]", "[tblAMUDailyRptsMatrix]",
"[Banner Label]='" & Me.cboBannerLabel & "'")
Me.txtQueue = DLookup("[Queue Data Goes In]",
"[tblAMUDailyRptsMatrix]", "[Banner Label]='" & Me.cboBannerLabel & "'")
Me.txtDeliverTo = DLookup("[Deliver To]", "[tblAMUDailyRptsMatrix]",
"[Banner Label]='" & Me.cboBannerLabel & "'")
Me.txtPrimaryContact = DLookup("[Primary Contact]",
"[tblAMUDailyRptsMatrix]", "[Banner Label]='" & Me.cboBannerLabel & "'")
> hi Welthey,
>
[quoted text clipped - 15 lines]
> mfG
> --> stefan <--
Stefan Hoffmann - 13 Jan 2008 16:04 GMT
hi Welthey,
> I'm not quite sure what that means. Is that something that I need to type at
> the beginning of the code?
Yes.
You may take a look at Tools/Options. There you can check
"Require Variable Declaration". When creating a new module of any type,
this will place the "Opition Explicit" at the first line if it.
Without this, any variable name, even it is a typo, will be accepted:
Dim i As Integer
i=100
i=j+1
MsgBox i
This is also a problem, when you refer to controls and rename them later.
> Private Sub cboBannerLabel_AfterUpdate()
> Me.txtReportName = DLookup("[Report Name]",
> "[tblAMUDailyRptsMatrix]", "[Banner Label]='" & Me.cboBannerLabel & "'")
This looks fine. Place the Option Explicit into the first line of your
form module and run Debug/Compile.
mfG
--> stefan <--