Angello Pimental
Registered User.
- Local time
- Today, 10:27
- Joined
- May 9, 2001
- Messages
- 92
Well.....
After all the different pieces of advice, and all the failed coding attempts, I have finally succeeded in getting my query to work.
In the query that I have based my form on, I have the following:
Field: Month([renewaldate])
Criteria: [Forms]![renewalform]![month]
Field: Year([renewaldate])
Criteria: [Froms]![renewalform]![year]
Then I have two txtboxes on my form; month and year, which are populated by the values chosen in the comboboxes. As I used JWINDON suggestion of creating another table which stores the values for my comboboxes. One table for Months, in written and numbers:
January : 1
February: 2
And another table for the years:
2001
2002
2003
Then the month number (e.g. 1 for January) is stored in the second column of the combobox.
And in the afterupdate of the comboboxes I put:
Me!Month = Me.monthcombo.Column(1)
and
me!Year = Me.yearcombo.column(0)
Then I just made a button to requery the query.....
me.requery
And voila it works.....
Thanks to everyone who tried to help, all your advice and code helped somewhere.
Thanks
After all the different pieces of advice, and all the failed coding attempts, I have finally succeeded in getting my query to work.
In the query that I have based my form on, I have the following:
Field: Month([renewaldate])
Criteria: [Forms]![renewalform]![month]
Field: Year([renewaldate])
Criteria: [Froms]![renewalform]![year]
Then I have two txtboxes on my form; month and year, which are populated by the values chosen in the comboboxes. As I used JWINDON suggestion of creating another table which stores the values for my comboboxes. One table for Months, in written and numbers:
January : 1
February: 2
And another table for the years:
2001
2002
2003
Then the month number (e.g. 1 for January) is stored in the second column of the combobox.
And in the afterupdate of the comboboxes I put:
Me!Month = Me.monthcombo.Column(1)
and
me!Year = Me.yearcombo.column(0)
Then I just made a button to requery the query.....
me.requery
And voila it works.....
Thanks to everyone who tried to help, all your advice and code helped somewhere.
Thanks