private void goButActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_goButActionPerformed
        try {
            location = locationTf.getText();
            try {
                search.setCommand("SELECT * FROM properties WHERE city = ?");
                search.setString(1, location);
                search.execute();
            } catch (SQLException ex) {
                Logger.getLogger(search.class.getName()).log(Level.SEVERE, null, ex);
            }
            if(search.next()){
            if(location == null || "".equals(location)){
                    JOptionPane.showMessageDialog(this, "Error; please enter a location");
                    locationTf.setText("");
                    locationTf.requestFocus(true);
            }
            else
                {
                try {
                    retrieveUpdateDelete next = new retrieveUpdateDelete(location, minPrice, maxPrice, user, date);
                    
                    this.setVisible(false);
                    next.setVisible(true);
                    //this.setVisible(false);
                } catch (SQLException ex) {
                   JOptionPane.showMessageDialog(this, "error with search \nPlease try again.", "ERROR", JOptionPane.WARNING_MESSAGE);
                    JOptionPane.showMessageDialog(this, ex, "ERROR", JOptionPane.WARNING_MESSAGE);
                }
                }
            }
            else{
                    JOptionPane.showMessageDialog(this, "No Properties match the criteria");
                    locationTf.setText("");
                    locationTf.requestFocus(true);
            }
        } catch (SQLException ex) {
            Logger.getLogger(search.class.getName()).log(Level.SEVERE, null, ex);
        }
            
        
    }//GEN-LAST:event_goButActionPerformed