dsum overflow.....

  • Thread starter Thread starter tony
  • Start date Start date
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
 
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
 

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

Back
Top