dsum overflow.....

T

tony

hi

i have a access database (250mb)

when access run this line,
i get:

run time error : 6
Overflow


totaldga = DSum("nombre_dga", "tbExcel", " jour >= " + "#" & Me.txtDateDebut
& "#" + " and jour <= " + "#" & Me.txtDateFin & "#" + " and heure_debut >=
" + "#" & Me.txtHeureDebut & "#" + " and heure_fin <= " + "#" &
Me.txtHeureFin & "#" + " and transit in (" & Left(strIN, Len(strIN) - 1) &
")")


hi

i have a access database (250mb)

when access run this line,
i get:

run time error : 6
Overflow


if i do
totaldga = DSum("nombre_dga", "tbExcel", " jour >= " + "#" & Me.txtDateDebut
& "#" + " and heure_debut >= " + "#" & Me.txtHeureDebut & "#" + " and
heure_fin <= " + "#" & Me.txtHeureFin & "#" + " and transit in (" &
Left(strIN, Len(strIN) - 1) & ")")

that work fine...


any idea?

thanks
 
M

MGFoster

tony said:
hi

i have a access database (250mb)

when access run this line,
i get:

run time error : 6
Overflow


totaldga = DSum("nombre_dga", "tbExcel", " jour >= " + "#" & Me.txtDateDebut
& "#" + " and jour <= " + "#" & Me.txtDateFin & "#" + " and heure_debut >=
" + "#" & Me.txtHeureDebut & "#" + " and heure_fin <= " + "#" &
Me.txtHeureFin & "#" + " and transit in (" & Left(strIN, Len(strIN) - 1) &
")")


hi

i have a access database (250mb)

when access run this line,
i get:

run time error : 6
Overflow


if i do
totaldga = DSum("nombre_dga", "tbExcel", " jour >= " + "#" & Me.txtDateDebut
& "#" + " and heure_debut >= " + "#" & Me.txtHeureDebut & "#" + " and
heure_fin <= " + "#" & Me.txtHeureFin & "#" + " and transit in (" &
Left(strIN, Len(strIN) - 1) & ")")

that work fine...

What's the data type of "totaldga"? It has to be big enough to hold the
result of the DSum() function.

Dim totaldga As Long

or

Dim totaldga As Double
 
Top