Counting # of records in MDB file with Infopath - InfoPath Dev
in

InfoPath Dev

Counting # of records in MDB file with Infopath

Last post 04-15-2007 08:48 PM by Shiraz Cupala. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-13-2007 10:37 AM

    Counting # of records in MDB file with Infopath

    If anyone could help me on this issue it would be greatley appreciated?

    I have a database setup in Microsoft Access that contains a table of student data. Right now it will be used to track a associated "Assigned Teacher" field.

    I currentely have my XSN file setup to pull the list of teachers names on a drop down list box (Assigned Teacher field).

    Is their a way to have Infopath display an error message when a certain number (25) of students have been submitted to the database and not let anymore students be entered for the specified teacher but still let them select another teacher from the list that does not have 25 students yet?

    I have been working on this one for a while but have not come up with a good solution at this point?
  • 04-15-2007 08:48 PM In reply to

    Re: Counting # of records in MDB file with Infopath

    One way to do this would be to query the DB for all the students, then set a condition on your submit or elsewhere that if the number of students for a given teacher is 25 then fail the submit and display a dialog instead. You can do this by using rules on a button. First rule would check the condition and display error dialog as needed then stop processing rules. Second rule with do the submit. This method I'm describing would allow you to achieve what you want without any code. The condition you have to write is a little complex (with filtering and count logic) but should be possible using the condition builder UI in InfoPath.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.