Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA code help...refresh form record each item in database

Status
Not open for further replies.

mvital

Technical User
Joined
Jul 2, 2003
Messages
128
Location
US
I have an input form with three elements. One element is a date, report number, and inspector which should be entered once for the form and recorded for each record. The second element is two combo boxes that are synchronized. They are both text and a sentence or two. Depending on what your first choice is it will populate the second combo box with the items pertaining to that choice. The third element is a series of check box items, i.e. yes, no, n/a, another date, and comments. After a choice is made for each combo box I want to be able to check yes or no or n/a and date and any comments for that combo box combination. After I am done with that item I want to select two other choices and check the appropriate check boxes for that items etc. How do I make it so that this input information is recorded each time in the Access table?

Right now, my first combo box combination is recorded in the underlying table, but not my other choices. I am not a programmer, but I would imagine this has to be done via VBA code an afterupdate or something like it.

Here is an example:

Date 03/01/06
Report# 148-178
Inspector Jack

(1st combo box) Jackets
Purses
Shoes
(2nd combo box) Leather
Cotton
Vinyl
Yes No N/A CloseDate Comments
X 03/15/06 Think

I want the information to be recorded in the database table like this:

Date ReportInspector Item1 Item2 Yes No N/A CDate Comments
03/01/06 148-178 Jack Jackets Leather X 03/15/06
03/01/06 148-178 Jack Jacket Vinyl X
03/01/06 148-178 Jack Purses Hobo X
03/01/06 148-178 Jack Shoes Boots X

thanks in advance

 
Could this do the trick ?
Private Sub YrCombo_AfterUpdate()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
end sub

Herman
Say no to macros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top