Want BLANK form, then populate text boxes from combo box

JJG

New Member
Joined
Jan 15, 2003
Messages
3
I am putting together an inventory check out system and cannot get my return form to work right. It pulls its data from a query that is based on a transaction table that contains an EquipmentID, User ID, Out date, and In date. I set up a combo box so that any checked out items will appear in the list. When I choose the item being returned, the user id and check out date appear on my form. The problem is how can I get the form to be blank upon opening. Right now, it contains the first record info from the query until a choose something from the combo box.

This is probably easy but I haven't been using Access long.

Thanks.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
That doesn't work. I think it may be because the form is based on a query. The combo box is set to look up values in the query. It works fine but the form opens with data in it (the first record in the query). I want it to be blank until something is chosen ftom the combo box.
 
Upvote 0
Here's one way that should work:

In the combobox, if you have anything in the Control Source property, delete it. Then base the combobox on a query (Select EquipID from My Table, for example). Then put the following code in the AfterUpdate event of the combobox:

<pre>Private Sub cboMyCombo_AfterUpdate()
Me.Filter = "[EquipID] = " & Me.cboMyCombo
Me.FilterOn = True
End Sub</pre>

Hope this helps,

Russell
 
Upvote 0

Forum statistics

Threads
1,221,510
Messages
6,160,226
Members
451,632
Latest member
purpleflower26

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