Solved Current Record Appending problem into subform (1 Viewer)

ZKHADI

Member
Local time
Today, 21:16
Joined
Apr 5, 2021
Messages
118
hi guys i am working on a small database.
in which i have student profile linked with Fee Table this fee is just for print i dont need it in accounts yet.
when the student pay the Fee then i want append this current row into Paid Fee Form.
for that reason i made an append query like this.

  • INSERT INTO PaidFeeT ( FacultyPaid, MonthYearPaid, SecurityFeePaid, AdmissionFeePaid, TotalFeePaid, SR )
  • SELECT FeeT.Faculty, FeeT.MonthYear, FeeT.Security, FeeT.AdmissionFee, FeeT.TotalFee, FeeT.ID
  • FROM FeeT
  • WHERE (((FeeT.SR)=[forms]![FeeTF]![SR]));
and on checkbox i code like docmd.openquery "Query1"

now the reason is when i click the checkbox on the FeeTF form the current record appended to PaidFeeF
but when i goto the main form and from subform i click the checkbox i get this enter parameter message. which says to type the ID of current record.
is there any way not to get this message and the current record appended into Fee paid Form
Untitled.jpg
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:16
Joined
May 7, 2009
Messages
19,227
your form is now become a SubForm so, modify your query
and use the MainForm!Subform as criteria:

  • WHERE (((FeeT.SR)=[forms]![MainF]![FeeTF]![SR]));


EDIT:
there is 1 answer on that forum, unfortunately, out of plumbness.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:16
Joined
Feb 19, 2002
Messages
43,200
If you use a bound subform, you have no need to run an append query.
 

ZKHADI

Member
Local time
Today, 21:16
Joined
Apr 5, 2021
Messages
118
your form is now become a SubForm so, modify your query
and use the MainForm!Subform as criteria:

  • WHERE (((FeeT.SR)=[forms]![MainF]![FeeTF]![SR]));


EDIT:
there is 1 answer on that forum, unfortunately, out of plumbness.
no this still not working
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:16
Joined
Feb 19, 2002
Messages
43,200
Isn't that what you are recording? Are you making a second transaction, is that why you are using a bound form AND running an append query? Seems redundant to me if the info for the second transaction is available from the info saved in the first one.
 

ZKHADI

Member
Local time
Today, 21:16
Joined
Apr 5, 2021
Messages
118
in first table named FeeT is the Fee deposit slip will generate. after the fee deposit by student i will put the paid amount into accounts table which is FeePaid. it means if some students disappear or not paid and the current fee will be in pending for next time then we will get the exact amount by this method.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:16
Joined
May 7, 2009
Messages
19,227
can you upload a sample db?
 

ZKHADI

Member
Local time
Today, 21:16
Joined
Apr 5, 2021
Messages
118
yeh here it is
 

Attachments

  • working on it .accdb
    3.8 MB · Views: 372

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:16
Joined
May 7, 2009
Messages
19,227
try this.
 

Attachments

  • working on it .accdb
    3.8 MB · Views: 485

ZKHADI

Member
Local time
Today, 21:16
Joined
Apr 5, 2021
Messages
118
Thank you so much you did for me. this working now Thanks once more
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:16
Joined
May 7, 2009
Messages
19,227
you are welcome :)
 

Users who are viewing this thread

Top Bottom