Ken,
That now works, and of course it shows that I should have read the help files more carefully. Thank you so much for taking the trouble to explain it to me. I've learnt something new - again thanks to Tek-Tips and a very patient contributor.
Thank you,
Ted.
Thanks Ken,
I have read this through before, but your highlighting and attention to detail has helped me understand it better, which makes me wonder whether (by way of contradicting all I've just said)why the following didn't prevent edits after opening the form:
Application.Echo False...
Ken,
Thanks for your reply. Actually, it's (you've guessed it) slightly more complicated than that. My form creates "Favourite" entries to be entered on my main form in one touch to save the laborius re-entering of the same data, so I have on it a means to look up and edit existing Favourites...
Hi Everyone,
This is perhaps a slightly different take on the mouse scroll problem, which I'm aware that there are many links FAQs and what have you. My Favouritesfrm is based on a query, and to create new Favourites I click a button containing the following (not elegant nevertheless it works...
Well PH,
No surprise, it works, only I was able to close rcptofficefrm - I have the query running from Combo172, which is on the ReceiptInput form. It's perfect - sorry to have got you so embroiled in my confusion. I hope to write my own SQL when I obtain a brain.
Thanks a million,
Ted
PH,
The query works fine in selecting the parameter but I can't stop this error 3061 when using the query name in the ORDER BY part of the procedure, because, if the Receipts table is referred to here then the default values will be those in the overall table and not the queried/filtered part...
PHV,
They're all the same fields as in Receipts table (on which I had based this form). The only difference is that I decided to base the form on a parameter query which queries the Receipts table based on receiptlocationID, because now I have three sets of default data to present the three...
Thanks Aceman,
I've tried your suggestion as follows: Private Sub Form_Current()
Dim db As DAO.Database, rst As DAO.Recordset, SQL As String
If Me.NewRecord Then
Set db = CurrentDb
SQL = "SELECT TOP 1 [receiptlocationID], Book, Receipt, ReceiptDate, ProjDeptID, LocationSuffixID, AccountID " & _...
I have used the following code (thanks to a tek-tips contributor) very successfuly, but now wish to enable it for multi-users according to the value receiptlocationID: Private Sub Form_Current()
Dim db As DAO.Database, rst As DAO.Recordset, SQL As String
If Me.NewRecord Then
Set db = CurrentDb...
Your issue wasn't complex enough for such techniqueGuess I deserved that too. My problem , is that it's all complex to me - though slowly becoming clearer and that's thanks to you and other patient contributors on this site. Thanks for your time tonight.
Ted.
Guess I deserved that!
I take it that that boflg, once declared, can be used to "flag" true or false statements. Bit long-winded perhaps, is that why you changed your mind or would this be preferred in certain procedures - or none of the above?
Ted
Spot on as usual PHV!
Don't know what a flag is in this connection, but I think I understand these statements better now. I had tried out the if-not-blank case at the beginning before, but didn't use the two End Ifs, I thought Else was required - if that makes sense? Anyway, thanks for your...
The following procedure for my button closes the present form and opens another if no data is in [Payee ID] or, if it's not blank, opens a message box with 'Yes' to close this/open other form and 'No' to go back to the [Payee ID] control: Private Sub Label79_Click()
Dim stDocName As String...
Hi All,
The following code for repeating values in one of my forms has served me well, but now it throws up the "too few parameters expected 1" error: Private Sub Form_Current()
Dim db As DAO.Database, rst As DAO.Recordset, SQL As String
If Me.NewRecord Then
Set db = CurrentDb
SQL = "SELECT TOP...
Sorry to labour this one, but if anyone has an idea how to crack the above I should be most grateful. The procedure (with my untrained eye) looks perfectly adequate - especially coming from a top tipster, but will not prevent form closure with blank fields for all but the first control in the...
PHV,
Thanks for your reply. That procedure worked fine for the first field and then only once (I was able to close the form on the second click of the close button), and not at all on the remaining fields. I tinkered a little by substituting ElseIf, with the same result.
Any ideas?
Ted.
I'm unsure if I sent this already but my thread history tells me I failed to send. However, could someone assist with an effective way of doing the above. I have looked through FAQ's, searched through this site and looked on Microsoft's help site, but stil I'm confused. The following procedure...
That's great PHV. I deleted the line Me!Text36.SetFocus because an error message came up indicating that one couldn't set focus on this control. No matter, because it automatically focuses on the preferred control.
So many, many thanks once again for your time and effort.
Ted.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.