Popup form on another form

cclark9589

Registered User.
Local time
Today, 15:57
Joined
Sep 22, 2008
Messages
79
Done some searching and sure can't find an answer to my current issue most likely because I can't figure out how to frame my search parameters. Here goes.....

Timesheet form with a subform for expenses. One of the fields on the expense sfrm is Expense Type and one of the expense types is Mileage. What I would like to happen is that if the Mileage expense type is selected a new form will pop up and in this form the user enters the mileage and then the expense amount is calculated automatically.

Presently we are calculating what the expense is and then entering that for the Expense Amount but there is no record of the miles for that job should someone question it. That is one reason why I want this function, the other reason is to eliminate human error. Rather than relying on someone to correctly calculate the mileage expense I'd rather have a method where the amount is calculated based on miles inputted.

I don't want to have the mileage field as an "active" field i.e., not one of the tab stops so the only way I see of populating this field is with a small form that pops up. I do want the miles to show next to the job they are being charged to and also be avaialable for any future query/reports I may have to run.

A little preventive medicine I guess. Anyone got some ideas? Keep it very simple as I a not an Access junky/freak and really, know just enough to be harmful to myself and those in the immediate vicinity.

Thanks if advance.
 
Timesheet form with a subform for expenses. One of the fields on the expense sfrm is Expense Type and one of the expense types is Mileage. What I would like to happen is that if the Mileage expense type is selected a new form will pop up and in this form the user enters the mileage and then the expense amount is calculated automatically.
You can use the WHERE argument of the Docmd.OpenForm method to open the form and get it to filter to that record.

Have a look at this link:

http://baldyweb.com/wherecondition.htm
 
I'll give WHERE a go and see what I can make of it. Thanks for the link by the way, lots of interesting stuff there that could prove to be very useful in my application.
 
No problemo! That link is from pbaldy, a VIP member on here.
 

Users who are viewing this thread

Back
Top Bottom