Differences accdb and accde

D

domenico

I have strange problemm

I have a form with record source tbltableA

I have a button to send email with form field

my flow is

' force save form

If Me.Dirty Then
RunCommand acCmdSaveRecord
End If


' DELAY 1 second
' and then read record before save

sql = "SELECT * FROM tbTableA " & _
"WHERE CodA='" & Me.CodA & "' AND " & _
"CodB='" & Me.CodB & "'

Set db = CurrentDb

Set rs = db.OpenRecordset(sql)

......

with .accdb works good but i create .accde not works.
but if I put delay 1 seconds before read recordset all works !!

Sorry for my english

Thanks Very much
Domenico
 
S

Stefan Hoffmann

hi Domenico,

my flow is

' force save form

If Me.Dirty Then
RunCommand acCmdSaveRecord
End If
Instead of RunCommand use

If Me.Dirty Then
Me.Dirty = False
End If

This will trigger the save action.
' and then read record before save
sql = "SELECT * FROM tbTableA " & _
"WHERE CodA='" & Me.CodA & "' AND " & _
"CodB='" & Me.CodB & "'
Does your forms record source point to tbTableA?
with .accdb works good but i create .accde not works.
but if I put delay 1 seconds before read recordset all works !!
So you don't retrieve any data without the delay? Strange.
Is this table a local one or a linked table?
Sorry for my english
It's okay.


mfG
--> stefan <--
 

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

Top