Hi everyone!
Could someone help me with this, please?
I run Access2000 on XP
Have created a Report.
Have placed a button on a form to email the report
Works fine - email is generated, ready to input the To address & send. However If I decide not to send it afterall and (X) close the email this is what happens:
* I get a dB error message (1) which I can close with an OK,
* then it runs...
User Profile
Collapse
-
Emailing a Report - Error if mail is cancelled
-
Also - not sure if this makes a difference..
Whilst fld: CTN is on tbleCOMPLIANCE, the FRM1 (where we are trying to locate a valid CTN via this FRM2 SearchBox) is created from a Query based on tblCOMPLIANCE and one other tbl....?
Cheers
AMBLY -
Hi J
Thanks for looking !
So, yes I can sort of understand...bu t sorry, I still need a bit of coaching as to where to put things!
CTN is a Primary Key/AutoNumber field in table named tblCOMPLIANCE.
It's format is 000. FRM2, the search form, has the Unbound Text Box also set as format 000.
So, on my Search FRM2, behind the Search button named cmdFindCTN, I put this code - which I'm sure I've...Leave a comment:
-
Thanks Puppydogbuddy!
I will certainly store that one in my growing file of Access Tricks!
I might just have a go doing that instead of my (possibly not good) surgery on the code...
This forum is a great help for newbies like me, glad I found it.
Cheers
AMBLYLeave a comment:
-
Well J :-))
You got the last laugh !
Me'Refresh duly added...
and cboStatus duly and visibly = No!
Yipee! Amazingf what 2 words and a dot will do...(Gee, the things that make us rejoice........ ..)
Thanks a million and for sticking with it
Happy AMBLY
Now, since I have a captive audience, if you have a mo, would you mind taking a peek at this one:...Leave a comment:
-
Thanks J
I will try that and come back...
Meantime I discovered something regarding your other initial suggestion..
If I try (and it makes no odds if the Cancel - True bit is before or after it)
Me.cboStatus = "No"
Cancel = True
Then, in the change to cboStatus does happen! but, 'behind the curtain'......i e: I have cbostatus as "Complete" and a field deliberately...Leave a comment:
-
Hi puppydogbuddy
Thanks for replying!
But that doesn't make sense to me? how can for eg, cboTHIS be Null AND "Y" at the same time?
1. If IsNull(Me.cboTH IS) Or Me.cboTHIS = "" Or Me.cboTHIS = "Y" And Me.cboStatus = "Completed" Then
2. MsgBox etc.....
But I tried it out anyway - and if I change all the Or's to And essentially what happens...Leave a comment:
-
Help with Validation argument
Hi
Hope you can help me with this
I run Access2000 on XP
Form has 3 fields:- cboSTATUS - which can be set via Limited value List A B or Complete. Default is set as A.
cboTHIS - which can be set via Limited Value List X, Y or Z. No Default. Intiially field in blank (Null).
txtTHAT - which can be anything. No Default text. Intiially field in blank (Null).
SCENE1: User goes to... - cboSTATUS - which can be set via Limited value List A B or Complete. Default is set as A.
-
Hi J
I'm guessing you've tested in some way? - but sadly, this doesn't work for me either!
It again goes to Compile error on .ItemData :
5. Cancel = True
6. Me.cboStatus = Me.cboStatus.It emData(2)
Hmmm! ? I'm sure it's something to do with it being a ComboBox with a " Value.List bound to Col1" - but that's as far as I can figure:-)
Cheers
AMBLYLeave a comment:
-
Hi J
Thanks for your reply..
If I make it:
5. Cancel = True
6. Me.cboStatus = "No"
then it Cancels fine, but just ignores Line 6 and doesn't change the entry in cboStatus at all.
Is is because cboStatus is a closed Value-List Combo Box?
Because, if I test by making line 6. act on a 'normal' a txtBox (say txtABC) which is linked directly to the table,...Leave a comment:
-
Thankyou ADezii ,
I appreciate your help :-)
I actually have more than one Validation, which applies to the table fields - so I think keeping the Validation at form level works best? In did try this out though, just on the one field as you suggested and it didn't work for me? Maybe I did something wrong....
But anyway, you did set me thinking, and I have now basically put all field Validations at record level...Leave a comment:
-
Reset Combo Box entry?
Hello !
Could someone please help me with this?
I have a ComboBox named cboSTATUS with a limited Value List, bound to Col1.. Values : "Yes";" No";" Completed"
The selected Value is stored in fldSTATUS in tblONE.
I have Validations which act on the selection in cboSTATUS, and they work fine.
My Question is: if a Validation doesn't pass, I want the... -
I should also add....as the code stands at present:
If user has tried to find a CTN on FORM1 which does not exist, FORM1 still does open, but none of the fields are visible. So any code amendment, would have to cancel opening of FORM1, and just leave User on FORM2 with the desired msg box popping up.
Also, if a match is found, I want FORM2 to close when FORM1 is opened
Thanks!
AMBLYLeave a comment:
-
Hi Mary
I hope you can help me again :-)
Just rethinking the whole thing, based on your previous advice - I am now opening FORM1 to a specific record (via a search in it's field named: CTN) by having Users enter search criteria into a FORM2 unbound text box.
FORM2 TxtBox is called: txtCtrCTN)......I put a cmdButton called cmdFindCTN beside it via CommondBox Wizard. The resulting unadulterated code behind the...Leave a comment:
-
Validation Code - Comparing 2 fields on a form
Hello!
Would be grateful for help with this one - a Record level Validation problem
I run Access 2000 on XP
A form has two fields:
1) fldLevel – it’s an Option Group with 4 choices = 1, 2, 3 and 0.
2) fldStatus – is a limited value-list (Combo) with 3 choices = Unassigned, In-Progress, Complete.
Any record in the form cannot be both Level_0 and Status_Complete
... -
Thankyou for the reply and sorry for my late acknowledgement - I thought I would get an auto-email advising I had a reply to my question, but I didn't (unless I deleted it in error!!)......
Out of neccessity, the user is already in FRM1 (which has restricted password-only entry) when s/he needs to perform the search, so unless I've missed the plot (not unimaginable!) I think this code will not do what I want, unless I add an enter-password...Leave a comment:
-
Search Form to Search for Value in another Form
Hello ! Hope someone might be able to help me with this one. I run Access2000 on XP.
I have a form : frmONE- which contains a txt field: ctrCTN from my table/database. The values in ctrCTN are unique. Next to this field is a cmdFIND button
frmONE is open and the active window.
I want to search for values in ctrCTN, and go to the record which contains that value. I do not want to use a cmdButton with in-built...
No activity results to display
Show More
Leave a comment: