Popup form on another form (1 Viewer)

cclark9589

Registered User.
Local time
Yesterday, 22:21
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.
 

vbaInet

AWF VIP
Local time
Today, 06:21
Joined
Jan 22, 2010
Messages
26,374
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
 

cclark9589

Registered User.
Local time
Yesterday, 22:21
Joined
Sep 22, 2008
Messages
79
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.
 

vbaInet

AWF VIP
Local time
Today, 06:21
Joined
Jan 22, 2010
Messages
26,374
No problemo! That link is from pbaldy, a VIP member on here.
 

Users who are viewing this thread

Top Bottom