Help With Access Problem

twuncher

New Member
Joined
Aug 4, 2003
Messages
12
Ok ive been stuck for ages fiddling about and i just needed some help so i thought i'd come to the experts :biggrin:

Ok heres what i want to do

Ive got a form with a combo box so you can select a record..

ive got an end date for this record that will be input aswell.

Ive got a table with the records and the retention periods(in days)..

and i want it so that when i select a record and input an end date that this will add the retention period onto the end date to give me a destruction date.
I want this destruction date to be saved into a table aswell

thankyou for your time
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
So, you've got something like --
[ItemID] [End Date] [Retention Period] [Destruction Date]?

First thing, [Destruction Date] is the result of a calculation. Therefore it should not be stored but should be in a query.
I would do the following:
Build a main form (unbound) with an unbound ComboBox that let me search for items using [ItemID] but show [Item Description].
On a subform with [ItemID] synchronised to the ComboBox (I can clarify if you need it), you have records based on a query with the 4 fields above and the [Item Description]. Now, when you select the item in the combo the corresponding record appears in the subform.
The [ItemID], [Item Description], [Retention Period] and [End Date] fields are from the table. You can enter the [Retention Period] if needed, and the [End Date]. For [Destruction Date] the RecordSource is
=DateAdd("m",[End Date],[Retention Period]) -- assuming that the period is months. If you want days or weeks, change the "m" to "d" or "w". Check the DateAdd function for correct syntax -- I may have the [End Date] and [Retention Period] the wrong way round.

Hope this gets you on the right track.
 
Upvote 0

Forum statistics

Threads
1,221,551
Messages
6,160,460
Members
451,648
Latest member
SuziMacca

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top