By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,288 Members | 1,695 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,288 IT Pros & Developers. It's quick & easy.

Form should only submit if number of entries in the table's field is less than 3

P: 1
I am a newbie to Access (using Access 2010) and require assistance on this:

I have a form (called User_Input)with 2 text boxes, 5 combo boxes and a Submit button, which is bound to a table (called Submssion table) i.e the form submits its entries into the table called Submission.

I want the submit button on the form to work based on this condition:

1. Check current submission of four fields (corresponding to entries from 4 out of the 5 combo boxes on the form) in the table and confirm if the current selection on the form already occurs in the table up to two times. If this is the case, the Message Box should pop up on the form informing user to make another selection as maximum number of entries for that particular selection is already in the Submission table.

2. The checks for the four fields will be done simultaneously as the selection will be done together on the same form.

3. However, if the entries on the Submission table is not up to 2, the entries should be saved to the table and Messagebox should display "Thank you for your Submission"

I need to use Macros for this being a web database which will be published using Sharepoint and VB is incompatible with the web database.

Thank you for your assistance
May 29 '14 #1
Share this Question
Share on Google+
1 Reply


twinnyfo
Expert Mod 2.5K+
P: 3,482
twinnie,

Macros = "Yuck!" Macros are very limited when it comes to complex actions in MS Access.

However, I think your challenge begins with explaining a little better what you mean by the "4 out of 5" combo boxes. I fyou know anything about numbers, the possible permutations of five combo boxes (depending upon the number of possible entries for each Combo Box, can make your logic very challenging.

If you begin by explaining what these combo boxes refer to and how the "four out of five" is supposed to work, we can begin there.

The basic concept will be that you determine the values of the four combo boxes, then perform some form of DCount on the Table, based on the values of the Combo Boxes, and if the value is less than 2, you can append the record.

This would be much simpler in VBA, but I understand your constraints.

Please provide us more information and we'll try to work a way ahead.
Jun 9 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.