shirani79
This is not a simple operation and is dependant upon which version of Access you are using.
Furthermore, the solution REQUIRES that you have more than a novice level of understanding behind VBA and form design.
Finally, Out right requests for full code are against site policy. Bytes is not a code nor homework service. Please read the FAQ and posting guidelines.
HOWEVER,
Should you have some code and a method that you have already attempted, then please show us your work. We can help with that...
>> Read this Before Posting your (VBA or SQL) Code.