@FXML
    private void submitRequest(ActionEvent event) throws SQLException, IOException {
        if(selectedIssue != null) {
            if(aptNo.getText() != null) {
                if(test) {
                System.out.println("ready to submit request");
                }
                String existQ = "SELECT Request_Date, Issue_Type " +
                                    "FROM Maintenance_Request " +
                                    "WHERE Apt_No = '" + aptnumber + "';";
                Statement getExist = conn.createStatement();
                ResultSet exists = getExist.executeQuery(existQ);
                boolean issueExists = false;

                while (exists.next()) {
                    if ((issueSel.getValue().equals(exists.getString("Issue_Type")))
                            && (Date.valueOf(LocalDate.now()).equals(exists.getDate("Request_Date")))) {
                        Node node = (Node) event.getSource();
                        Stage stage = (Stage) node.getScene().getWindow();
                        Parent root = FXMLLoader.load(
                                    getClass().getResource("IssueExists.fxml"));
                        Scene scene = new Scene(root);
                        stage.setScene(scene);
                        stage.show();
                        issueExists = true;
                    }
                }

                if (!issueExists) {
                    String maintQ = "INSERT INTO Maintenance_Request(Request_Date, Apt_No,"
                                        + "Issue_Type) VALUES('" + LocalDate.now()
                                        + "', '" + aptnumber + "', '" + selectedIssue + "');";
                    Statement getMaint = conn.createStatement();
                    getMaint.executeUpdate(maintQ);
                    getMaint.close();

                    Node node = (Node) event.getSource();
                    Stage stage = (Stage) node.getScene().getWindow();
                    Parent root = FXMLLoader.load(
                            getClass().getResource("MaintRequestMessage.fxml"));
                    Scene scene = new Scene(root);
                    stage.setScene(scene);
                    stage.show();
                }

            } else {
                System.out.println("Please enter an Apt Number");
            }
        } else {
            System.out.println("Please selec a Issue");
        }
    }