You could create a table for each field that would contain commonly recurring data, then link a combo box to that table.
If I read you correctly, it would be something like this:
1):
create a table called
tblDescription, and in that table, have fields titled "description", "amount", and "control". Here, you could enter common "descriptions" along with the associating amount and control values - if those are the same for each type of transaction.
2):
create a combo box for "description" or if you already have a textbox, right-click it, choose "change to" and select combo box from the fly-out menu.
3):
In the combo box, under the "Data" tab set your [blue]Record Source Type[/blue to Table/Query (if not already there), and select the table,
tblDescription from the [blue]Row Source[/blue].
4):
While still in the properties for cmbDescription, choose the [blue]Event[/blue] tab, and find the
After Update event. click the build button to the right of that event, and choose "code builder".
5):
In your code builder, you should now see the following:
Code:
Private Sub cmbDescription_AfterUpdate()
End Sub
6):
You need to type the following code within this sub, so the final code would look something like this:
Code:
Private Sub cmbDescription_AfterUpdate()
If DLookup("[Description]","tblDescription","[Description] =" _
& Forms![MyFormName]!cmbDescription) Then
txtAmount = DLookup("[Amount]", "tblDescription", & _
"[Description] =" Forms![MyFormName]!cmbDescription)
txtControl = DLookup("[Control]", "tblDescription", & _
"[Description] =" Forms![MyFormName]!cmbDescription)
End If
End Sub
Try it out, and post back if any problems...
Stephen
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV