Opening a form

Lee Chai Ling

Registered User.
Local time
Yesterday, 18:51
Joined
Sep 29, 2004
Messages
15
I want to open a form2 after I key in a number in form1, the problem is: the number in form1 must be in a range of numbers in field A and filed B in table Order, if the number I key in form1 match the criteria, it will show form2, otherwise an error message will display!How? Thanks!
 
Search Access help or this board for the DCount function. This will allow you to compare the value chosen with a value in the table and either open the form or display an error message.
 
Find the max record which group by date

I have a problem to find the last record of my table which are sort by date. Eg: Date - Time -Product
1/1/04 - 6am - A
1/1/04 - 9am - B
2/1/04 - 7am - A
2/1/04 - 10am - B
3/1/04 - 8 am - A
3/1/04 - 10 am - B
3/1/04 - 12 am - C

I want the data to be 1/1/04 - 9am - B , 2/1/04 - 10am - B, 3/1/04 - 12am - C.
But it comes out 1/1/04 - 9am - A , 2/1/04 - 10am - B, 3/1/04 - 12am - C.
I had put the Max function for the time and product and group by date, but it can't function.So any methods to solve this problem?Thank you.
 
My If Then Else statement will only execute the first record. Example if there are four records, the statement look at first record to execute.

Example:
If varX = "Hardware" then
Docmd.openForm1
else
if varX = "Software" then
Docmd.openForm2
else
Docmd.openForm3

My data are as follow:
Description - Type
ArcviewCD - Software
Printer - Harware
Montor Cable - Others

I want the record with Type Hardware but the If Then Else statement select the Type Software. I think I have to put the recordset.movefirst or recordset.movelast.But it also can't produce the result I want.Therfore can
anyone help me to solve the problem?

Thank you in advanced.
 

Users who are viewing this thread

Back
Top Bottom