Check box useage (1 Viewer)

skelley

Registered User.
Local time
Today, 13:06
Joined
Jul 11, 2000
Messages
69
I am considering using a check box in a form based on an "Equipment List" table so that the user can "check" the items he wants to ship and put on a "Packing List" form (new table). Is this a good method? How would I "clear" the checks once the user has selected them? I hope someone out there has a better method.
 

KevinM

Registered User.
Local time
Today, 13:06
Joined
Jun 15, 2000
Messages
719
It's not necassirily a bad way of doing it.
There are several ways of doing it but all will give you the same result at the end of the day...a table populated with ID fields.

For your check box method you will have to include a check box field in your FIRST table ("Equipment List").
Create an APEND query (to TABLE 2) that appends all items that are TRUE and an UPDATE query that Updates all check boxes back to FALSE in TABLE 1.

Again there are several other ways doing this using DAO, ADO or SQL, but this is the easiest.

On your form have the queries run one after the other, APPEND then UPDATE (via a cmdButton)

Also put the line...
Me.Refresh
just before you run the first query so it gets any 'last minute' changes.

Also consider using the lines...

DoCmd.SetWarnings False
at the beginning
and
DoCmd.SetWarnings True
at the end of the routine and using a YesNo msg box so users are only confronted with msg box rather than the several built in ones that will accompany each action query.

HTH
 

skelley

Registered User.
Local time
Today, 13:06
Joined
Jul 11, 2000
Messages
69
Very good. Thank you.
However, I am somewhat unfamiliar with the using "YesNo Msg box" to replace the "built in ones". Can you show me how to do this?
 

KevinM

Registered User.
Local time
Today, 13:06
Joined
Jun 15, 2000
Messages
719
Dim Msg, Style, Response

Msg = "Append records to packing list" _
& Chr(10) & "Are you sure?"
Style = 36 + vbDefaultButton1

Response = MsgBox(Msg, Style)
If Response = vbNo Then
Exit Sub
Else

YOUR QUERY ROUTINE HERE

End If
End Sub

HTH
 

Users who are viewing this thread

Top Bottom