Attach a subroutine to an unbound Text box? (1 Viewer)

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
I see the tables didn't survive changing from docx to txt so I'll try again.
If possible, we would like to see a working sample of your database, so we can see the code you're using and troubleshoot it for you.
 

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
I have no idea how to suppy a working sample of the database. I think it will be easier to send the full workspace. I you can inform me how to supply you with a working sample, I will do it. If not I'll send the full workspace with all its data. Please let me know.
 

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
You asked me to send you a working sample so that you can see the code I am using, but the code is simply what you sent to me.
=IIf([Code1]="AL" Or [Code1]="AS",[Split1]*[Fee],[Amount]) placed in the control source column of the Data Tab. If I remove it from the control source then all of the Sigma possibilities are available. If I replace it in the control source, then only the "Count Records" part of the Sigma control are available. By the way, the actual code works perfectly to do what I wanted.
 

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
You asked me to send you a working sample so that you can see the code I am using, but the code is simply what you sent to me.
=IIf([Code1]="AL" Or [Code1]="AS",[Split1]*[Fee],[Amount]) placed in the control source column of the Data Tab. If I remove it from the control source then all of the Sigma possibilities are available. If I replace it in the control source, then only the "Count Records" part of the Sigma control are available. By the way, the actual code works perfectly to do what I wanted.
Hi. I am asking for a sample database, so I can better understand what you're trying to accomplish. Without seeing it, I am having a hard time following your questions. I need to see, not just the code; but also, your table structure, the names of your fields, how your form or report is designed, etc.
 

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
Did you see the table structure I sent yesterday above? Including it again. The report is just to supply a Bill to each patient monthly based upon their access to the Doctor that month. Some have more than one interaction (he's a psychiatrist), That is why I need to Sum the txtboxes on the right of the report to get a total bill for each patient.
 

Attachments

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
Did you see the table structure I sent yesterday above? Including it again. The report is just to supply a Bill to each patient monthly based upon their access to the Doctor that month. Some have more than one interaction (he's a psychiatrist), That is why I need to Sum the txtboxes on the right of the report to get a total bill for each patient.
Sorry, it's getting a little hard to follow what's going on now. It would really help if we can have a ACCDB file to play with. Looking at text and images isn't the same as executing some code and watching it work and troubleshoot it when it fails. These things you can't do with a PDF. Sorry...
 

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
I took out the address, city and zip of these patients and left their names in. What I want to happen is that the Doctor's secretary uses the "Day sheet" to clock in each patient and what transaction occurred. That is stored in the Transaction table. Then monthly I want a report to be generated using the rptbilling report to gather all the transactions that occurred for that month and total their amounts on the bottom of the form. (As I haven't been able as yet to total the amounts from the two txtboxes, the totals are not included in this report yet). Hope this works.
Just tried to send the accdb file and Access said
  • The uploaded file does not have an allowed extension. The following extensions are allowed: .zip, .txt, .pdf, .png, .jpg, .jpeg, .jpe, .gif
Want to send it but it seems it does not allow the accdb extension. Should I change it? To what?
 

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
I took out the address, city and zip of these patients and left their names in. What I want to happen is that the Doctor's secretary uses the "Day sheet" to clock in each patient and what transaction occurred. That is stored in the Transaction table. Then monthly I want a report to be generated using the rptbilling report to gather all the transactions that occurred for that month and total their amounts on the bottom of the form. (As I haven't been able as yet to total the amounts from the two txtboxes, the totals are not included in this report yet). Hope this works.
Just tried to send the accdb file and Access said
  • The uploaded file does not have an allowed extension. The following extensions are allowed: .zip, .txt, .pdf, .png, .jpg, .jpeg, .jpe, .gif
Want to send it but it seems it does not allow the accdb extension. Should I change it? To what?
Hi. Do a C&R first and then zip the file before uploading it.
 

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
Did that get through O.K.?
Yes, it did. Now, I'll need a step-by-step instruction from you to see the problem. If I try to open the report, it prompts me for dates, what should I enter? After it opens, what am I seeing, and what did you want to see instead? Please try to be specific. Thank you.
 

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
I have been using March 1 2020 for the first and March 30 2020 to the second. As there is very little data in the Transaction table (you can add some by using the "Day Sheet" and providing new data. It then DOES figure out the correct data to fill in the two txtboxes on the right of the form. When I try to total each of each of those two txtboxes, only the count records is available. All the rest are grayed out.
 

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
Just realized that when you try to run the rpt there will be no names on the report as I have removed them. Hope this doesn't cause a total crash of the rpt. If necessary put in a few names in the Patients table and use them to place data into the Transaction table.
 

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
Just realized that when you try to run the rpt there will be no names on the report as I have removed them. Hope this doesn't cause a total crash of the rpt. If necessary put in a few names in the Patients table and use them to place data into the Transaction table.
Hi. Since I am not familiar with your database, I am not sure simply entering names in the Patients table would be enough to show names on the report. And even if it does, that wouldn't help me understand what I'm supposed to see and how it's not correct. Instead, assuming the expressions (codes) you used in the boxes are correct and working, I made a slight change to your report, so you can try to see if you can now Sum them up.
 

Attachments

foxxrunning

Member
Local time
Today, 14:17
Joined
Oct 6, 2019
Messages
93
I wasn't aware that it was possible to write an expression in the query builder. So I see what you have done. When I run the print preview it works properly because the code works properly. But, when I try to create a total using the Sigma icon in the Design Tab, there still is only count records available. Is that different in what you worked on? I tried it both using the = sign before [CD1] and [CD2] or not using the = sign before them in the Control source area. Have you seen that as well? Thanks for your efforts in helping me on this.
 

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
I wasn't aware that it was possible to write an expression in the query builder. So I see what you have done. When I run the print preview it works properly because the code works properly. But, when I try to create a total using the Sigma icon in the Design Tab, there still is only count records available. Is that different in what you worked on? I tried it both using the = sign before [CD1] and [CD2] or not using the = sign before them in the Control source area. Have you seen that as well? Thanks for your efforts in helping me on this.
Hi. Since I cannot see what you're doing, I don't understand what you mean by using the Sigma icon. Where is the focus when you try to use the Sigma icon? In other words, which textbox was selected when you click on the Sigma icon?
 

theDBguy

I’m here to help
Local time
Today, 14:17
Joined
Oct 29, 2018
Messages
10,106
I wasn't aware that it was possible to write an expression in the query builder. So I see what you have done. When I run the print preview it works properly because the code works properly. But, when I try to create a total using the Sigma icon in the Design Tab, there still is only count records available. Is that different in what you worked on? I tried it both using the = sign before [CD1] and [CD2] or not using the = sign before them in the Control source area. Have you seen that as well? Thanks for your efforts in helping me on this.
Is this what you mean?
 

Attachments

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom