Solved Too few parameters - need workaround for invoking form control in recordset

Thank you all. I fixed it by putting the form controls inside Eval(). I also didn't understand that variables need to be outside of the sql string and concatenated and fixed that as well. I would like to explore the function from @theDBguy at some point but for now the issue is solved. I also probably could have done it @bastanu's way. Thanks everyone!
Glad to hear you got it sorted out. Good luck with your project.
 
Punctuating the dates properly will work. If you have something that works now and are pressed for time, I would advise to keep on this path for now, but eventually you might find something profitable in getting rid of the form and instead using the power of SQL to associate data from two different records that have some factor in common. This might take exploration and I don't want to delay you with your project. But if you are ready to look at this, do some reading and come back with questions.

The issue I suggested with a JOIN can best be understood by looking for topics using the SEARCH function of this forum. You can look for JOIN, INNER JOIN, OUTER JOIN, LEFT JOIN, or RIGHT JOIN (one of those at a time) for reading.
 
1. Date is the name of a function and so should NOT be used as a column name because it will be confused with Date(). Name is the name of a property and will cause problems with VBA. Not only is Me.Name not your column named name but Me.[Name] isn't either!!!! Access gives you warnings for BOTH when you use them as column names. You really should NOT ignore warning messages from Redmond. You do not know more than they do.
2. Now() includes a time component and will make your date comparisons not always work. Use Date() when you want JUST the date and use Now() when you want to include time.
 

Users who are viewing this thread

Back
Top Bottom