First one is when I click the "New Tenant" button on the bottom of the "frmNewLease"
The second is when I select a Make in the Vehicle form. This seems to work fine when I bring up the form independently but not when I bring it up as a subform.
See the attached Screenshots and DB
I am also unsure that the Vehicle form is properly connected to the Tenant which is its parent form.
Thank you both for the answers.
@PatHartman
I am trying to learn how to do this but don't seem to be having much luck. I even tried the subform wizard and I figured it would be sufficient. The problem is that It seems the other errors are getting in the way of checking to see if it is working.
@Fabrice Lambert
I found that I had an error in the relationships but now that it is fixed the frmVehicle form works as expected but that same form as a subform doesn't work. Any idea as to why? I know you said that I was trying to execute a query with the same name as the comboBox but wouldn't that mean that the form on its own would have the same error? Right now it doesn't.
And thanks for the requery fix it worked like a charm.
I've attached a new copy of the DB to reflect the relationship change and BTW was under tblCarModel. HCPV-Current.accdb
If the form works as a main form but not as a subform, you have some reference that is incorrect and you need to find it. "doesn't work" is not helpful. What is the error message you are getting and can you identify the line of code that is causing it? When the error message pops up, use cntl-break to drop into the code. If you drop into an error routine, you need to add a line of code after your module exit-
Resume
Then move the focus to the Resume statement using the yellow right arrow from the debug menu. Click on the line you want to be active and then click on the yellow right arrow. The line with the focus should highlight. Then you can step through the code and focus should move to the line that actually caused the error.
As long as the Resume is after an Exit Sub or Resume Next, it will never be executed. It is only there for you to use for debugging.
@PatHartman
I am not receiving an error at this point. I am just getting something asking for criteria for a requery. Everything seems to work fine when the the form is loaded independantly but but doesn't work when the form is a subform. The form I am referring to is frmVehicle.
There is an issue with how you are referencing the form. As I mentioned originally, you MUST include the mainform name in front of the subform name. Look again at my example.
Microsoft Access
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
Forms!mainform!subform!con