Custom Submit Using Rules

R

ridawg

Hey,

I've created a form to submit and update records in database. When I setup
my submit buttons I chose to use the Custom Submit Using Rules so I could
Switch Views to a Search view after new records were entered or existing
records were updated. I'm not having any problems with this in regards to
entering new records or updating existing records but when I try to delete an
existing record I get the following error:
InfoPath cannot delete the form data because the form template does not
support submit.

I don't get it. Why would I be able to submit new records and update
existing records but not be able to delete one?

Thanks!
 
A

Adam Harding

ridawg

have you switched off the warning messages in your database as that will
freeze the process until the Yes/No box is yes'd.

Hope this helps

Adam
 
R

ridawg

Adam,

Are you refering to the Security warning dialog box that pops up when you
open a database? If so how do I turn that off?

I have other databases that I've written VBA code in and have turned off the
warning by digitally signing them (basically I created my own certificate).
The problem with this method is that it only works if I'm the only one
accessing the database and if I'm only accessing it from my computer.

The InfoPath form I'm creating is for several users and the database will be
accessed by the manager of these users so I need to make sure everything
works for them.

Next question - why would this only impact the delete button and not the new
record button and my update button? My assumption would be if it is related
to the Security dialog box all 3 would be impacted.

And in general why does the damn Security Dialog box come up at all!? I
don't have any macros and haven't written any VBA at all in this database.

Thanks for the help!
 
R

ridawg

Adam,

I digitally signed my database so that the Security Dialog box wouldn't come
up but that didn't fix the problem. I'm still getting the same error:
"InfoPath cannot delete the form data because the form template does not
support submit.".

Next idea?
 
A

Adam Harding

Ridawg

2 things

1) Annoygin security box is an ADO warning when you open the form a joyful
microsoft security warning. To switch off go into Internet Explorer

Tools-Internet Options-Security-Custom-Allow data access accross domains.

That will switch off the box.

2) If your infopath form cannot submit then THAT is your problem. Go into
design then
tools-data connections-main connection-MODIFY-click next- READ THIS WINDOW

It explains why Submit is not allowed to your database. It could be a long
data type or something but either way your form is no longer linked properly
to your database.

Hope this helps

Adam
 
A

Adam Harding

Sorry

One other thing

The new record button sets up new dat in the infopath form first, not the
database, deleting is purely database action which is why it happens.

I am not talking about the warning on opening Access but the one you get
when deleting a record. This can be removed programmatically.

Cheers Adam
 
R

ridawg

Ok thanks. I'm not sure if I was clear regarding the problem I'm having. Let
me try to explain this again. I've configured my submit options to use Custom
Submit using Rules

1. I can query my database - no problem.
2. I can select a record and make changes to it and submit it back to the
database. No problems.
3. I can enter a new record and submit it to the database. No problems.
4. I cannot delete a record. That's when I get the error. I've checked my
form's dataconnection and it says submit enabled.

The only "submit" type action not working is the delete & submit action. Now
if I change my submit cofiguration from Custom Submit Using Rules to Database
my Delete button works but I lose the rules I've created.
 
A

Adam Harding

ridawg

cool clearer now.

OK one workaround that i could offer as this seems to be a BUG in Infopath
is to set your rules to run off a different trigger, ie the last field filled
in etc. That way you still have your rules and the delete works fine.

Sorry there is not a more complete fix but this is the first time i have
ever come across this problem.

Cheers Adam
 
R

ridawg

Adam,

Thanks for the help! Assuming this is is a bug - is there some way I can
report this just so somebody knows about this? If I could that would be great
so it at least somebody could look into this.

This is what I've done for a workaround - just in case you run into the
same problem.
Basically, I went back and configured my submit options back to Database.
This way I know all my submit and delete buttons work.

Next for my update and new record buttons I selected Custom code and wrote
my own Submit code. All the code really does is capture the default Submit
action and execute it. In addition to that, the code for these buttons switch
the view and force an update. Both of these buttons seem to be working just
fine and are accomplishing the same thing I was trying to do using Rules.

So the only button not working exactly the way I want is the Delete button
but at least a user can delete a record - it's just not switching back to my
default view or forcing an update. I did spend some time trying to figure out
how to do the Delete by writing code but I didn't have any luck and I need to
get this form done so I'll live with it for now.

Thanks!
 
A

Adam Harding

Post the question here as a suggestion for Microsoft and entitle it BUG

Also worth posting it in Infopathdev.com forum as ex microsoft employees run
it and they pass details back.

Cheers Adam
 
B

bwbob

Another option might be, (the only reason I suggest this is because it exists
in a program we use) would be to add a "Delete this record" check box. You
would have to add a field in your database for this to work, however, it
keeps the users from actually Deleting anything. This way, if you need to
see what happened or restore something, it is an easy task to "Undelete"
My .02
 
Top