Looping Code Question

D

DS

I have a subform that I enter Info on from a Listbox on a main form.
The code is this so far...

Private Sub ListMain_Click()
DoCmd.Echo False, ""
DoCmd.GoToControl "SalesDetails"
DoCmd.GoToRecord , , acNewRec
Forms!Sales.SalesDetails!LineID = _
Nz(DMax("[LineID]", "SalesDetails"), 0) + 1
Me![SalesDetails]![ItemID] = Me.ListMain.Column(0)
Forms!Sales.SalesDetails!MenuNum = Forms!Sales!Text65
Me.Refresh
DoCmd.Echo True, ""
End Sub

This works really well...
I want to add another statement to it and I am confused.
I added 3 new yes/no fields that I need.. they are

Taxed
Inclusive
No Tax

I want to loop through the records after a new item is present and if
the [Location] field (Located on the Subform "SalesDetails"} = "Bar"
Then if any Records or Items are "Taxed" then all of the "Inclusive"
fields will become false and the "Taxed" field for that record will
become true.
Any help will be greatly appreciated...it's taken 2 days to get this far.
Sincerely,
And Thanks
DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ECHO in the right place? 0
Loop Question 2
Code Help 10
No Records Then 4
DMax Problem 3
IF Statement Question 0
Referencing Subforms 1
DLookUp Trouble 3

Top