call me clueless... what's the ";" at the end for? does that change anything when trying to save it as a procedure? (i know i didn't have one on mine sql string)
hmm... i got the code to work... sort of... it runs the query only when i've gone through the combo boxes, like twice. also if the combo boxes are empty; it gives me a null error (null value invalid or something like that)
is there some way to input default values when the form first starts...
THANKS! that segment works now... now nothing is turning up on my query... and there's this weird thing that i get a "type mismatch" error every so often, even if i haven't changed any of the input. Could someone straighten me out?
Function FilterMonth()
Dim PayPeriodStart...
i want to assign some variables values from the start of the form... what is the action_event that allows me to do that?
(ie for a button click button_event, i want to know the even for when i first open up a form)
i'm sorry... this is still confusion...
okay, say i have a main form named Legs and a subform named Hips, it would look like this:
Forms!Legs!Hips!Hips.RecordSource
?
i get this "method not found" error when i do a subform.recordsource = sqlstring
also... according to that function, i would have to have a date put into it. would it work if i just went something like month(august) or something like that?
okay... if i was going to use .recordsource, can it be on a bound sub-form, or does it have to be on an unbound sub-form?
also,
how do we find the last DATE of the month. (ie is it the 29th? 30th? 31?)
i'm learning something new everyday... cstr()
well, it didn't work. i think i'm doing something wrong...
okay, i don't have the combo boxes linked to a table, instead i typed in the values i wanted at creation (using a wizard).
the first combo box is the month field. it has the months...
how do yo convert a date to a string?
here's what's going on...
the 3 combo boxes are supposed to give me dates.
combo box 1= month
2=pay period
3=year
i need to combine them all, to create a date so i can put it into the query.
hmm... i thought about that. but i'm really new to this that i'm even clueless on the syntax!
okay, how do i get the subform.property =sql statement? looking at the help files, i have to enter it in as a string. ie db.setdefquery = "select * from table"
i tried creating a string...
here's my problem. i have 3 combo boxes that are going to be used to determine the criteria for a sub-form. (month, payperiod--period 1 or 2, and year)
there are 2 payperiods in a month, (we're paid from the first to the 15th, and the 16th to the last day of the month)
i have a query that...
here goes..
there are 3 combo boxes, one for month, payperiod, and year. it's supposed to look for payroll stuff during the payperiod.
Option Compare Database
Dim begDate, lasDate As Date
Private Sub cmbMth_AfterUpdate()
FilterMonth
End Sub
Private Sub cmbyear_afterupdate()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.