Sales Database

noland0

New member
Local time
Tomorrow, 09:29
Joined
Mar 12, 2009
Messages
3
Ok. I'm creating a data which is primarily on Books and the selling of them

The tables are
-Book info
-Author
-Publisher
-Transaction info
-Customer

I'm trying to make a "sales form."

My customer can only purchase 3 books in one purchase and i want to create this form to enable me to store three books being purchased in one go.
How would one go about doing this?
Help would be GREATLY appreciated


I also have a validation problem. In words this is what i want. "This field must include the '@' symbol"

Thanks in advance :)
 
Ok. I'm creating a data which is primarily on Books and the selling of them

The tables are
-Book info
-Author
-Publisher
-Transaction info
-Customer

I'm trying to make a "sales form."

My customer can only purchase 3 books in one purchase and i want to create this form to enable me to store three books being purchased in one go.
How would one go about doing this?
Help would be GREATLY appreciated


I also have a validation problem. In words this is what i want. "This field must include the '@' symbol"

Thanks in advance :)

You will need an Orders table and an Orders Detail table. Use a sub form to enter a record for each book sold.

Have you looked at the Northwind Sample Database?

Once yo have your tables and form/sub form created, then you can easily add some VBA code to limit the sales to three books.

In the Sub form's On Current Event use:


Code:
Private Sub Form_Current()
    
    ' if 3 is the max records to enter
    Me.AllowAdditions = ( Me.RecordsetClone.RecordCount < 3 )

End Sub

or the Long hand version that does the same thing, but with more VBA code:

Code:
Private Sub Form_Current()
    
    ' if 3 is the max records to enter
    If Me.RecordsetClone.RecordCount < 3  Then 
       Me.AllowAdditions = True
    Else
       Me.AllowAdditions = False
    End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom