A
Alam via AccessMonster.com
I have 2 table both are exactly same
PatientRecordTransTb And PatientRecordTb
I know many programmer don’t like TempTb, but in my case I don’t trust some
one to mess
with my Main record table. So simple solution is make tamp table and after
review I click to transfer all records from temp Table to main Table So I
have two forms .
PatientRecTransFm record sources = PatientRecordTransTb
PatientRecordMainFm record source = PatientRecordTb
PatientRecTransFm has 2 button AddRecord And Delete Record
Here is a short story of my code (NOT A Actual Code)
mySQLString = "INSERT INTO PatientRecordTb( LastName,FirstName,Status …ect)â€
mySQLString = mySQLString & " SELECT PatientRecordTransTb.LastName,
PatientRecordTransTb.FirstName….
mySQLString = mySQLString & " FROM PatientRecordTransTb;"
MsgBox Yes No
If Yes: Then
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunSQL ("UPDATE PatientRecordTransTb SET PatientRecordTransTb.
RecAdded = True;")
DoCmd.RunSQL (mySQLString)
Me.Requery
End If
So far This was working perfect
Now I Add 2 Sub Form in PatientRec Main Fm And PatientRecTransFm
I need to know How can I update these 2 subform record from trans form to
main form ??
Is there is a way may be using child and master from trans form to child and
master main form .
Or How can I pass SQL String From SubFm To Main Form ?
PatientRecordTransTb And PatientRecordTb
I know many programmer don’t like TempTb, but in my case I don’t trust some
one to mess
with my Main record table. So simple solution is make tamp table and after
review I click to transfer all records from temp Table to main Table So I
have two forms .
PatientRecTransFm record sources = PatientRecordTransTb
PatientRecordMainFm record source = PatientRecordTb
PatientRecTransFm has 2 button AddRecord And Delete Record
Here is a short story of my code (NOT A Actual Code)
mySQLString = "INSERT INTO PatientRecordTb( LastName,FirstName,Status …ect)â€
mySQLString = mySQLString & " SELECT PatientRecordTransTb.LastName,
PatientRecordTransTb.FirstName….
mySQLString = mySQLString & " FROM PatientRecordTransTb;"
MsgBox Yes No
If Yes: Then
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunSQL ("UPDATE PatientRecordTransTb SET PatientRecordTransTb.
RecAdded = True;")
DoCmd.RunSQL (mySQLString)
Me.Requery
End If
So far This was working perfect
Now I Add 2 Sub Form in PatientRec Main Fm And PatientRecTransFm
I need to know How can I update these 2 subform record from trans form to
main form ??
Is there is a way may be using child and master from trans form to child and
master main form .
Or How can I pass SQL String From SubFm To Main Form ?