Re: Help with code

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thank you very much. Thant helped a lot.
"Rui" <Rui@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0E594ECB-31CF-4700-ACD8-F27C4DB96482@xxxxxxxxxxxxxxxx
I think I can understand John;'s rationale for asking that question.

It looks from the code that you are actually running a query and that it
is
that query that is 'asking for the date'. If this is so, then you may need
to
alter that.

Otherwise, I would just add a check to the biginning of the Sub
Summary_with_date_issued_Click(). Check that the text field for the date
is
not empty and if so, then exit sub (or notify user and exit sub).

Hope this helps



"Randy" wrote:

Wow! Are you having a bad day? I dont have a clue what your problem is.
Thanks for nothing!

"John W. Vinson" <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:jd4jd4h43ubvhp7m0obp0ulq51vih8ue7u@xxxxxxxxxx
On Tue, 23 Sep 2008 16:57:02 -0700, "Randy" <rcp@xxxxxxxxxxx> wrote:

Here it is again, Thanks

You had started a new thread rather than replying in the existng
thread,
so
other than doing a (rather vague) search for previous posts by "Randy"
there
was no way to easily find the previous discussion. You're not the only
person
asking questions here, by a long shot!

You posted:

Private Sub Summary_with_date_issued_Click()
On Error GoTo Err_Summary_with_date_issued_Click
Dim stDocName As String
Dim strWhere As String
DoCmd.SetWarnings False
If Me.Dirty Then 'Save any edits first.
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "Field Note Not Selected. Please Select a Field Note To
Print"

Else

stDocName = "InsertDateIssued"
DoCmd.OpenQuery stDocName

' MY QUESTION:
What is InsertDateIssued? An APpend query, an Update query, what? What
is
it
inserting and where?

You may be able to use the querydef Execute method instead if you just
want to
determine whether a new record was created. But since - again - you
didn't
post the information about your database, and since as an unpaid
volunteer
it's more than I'm comfortable doing to google for your previous
messages,
I
really don't know.

--

John W. Vinson [MVP]

stDocName = "Summary by Certificate Number"
DoCmd.OpenReport stDocName, acViewNormal, , strWhere


Exit_Summary_with_date_issued_Click:
Exit Sub

Err_Summary_with_date_issued_Click:

Resume Exit_Summary_with_date_issued_Click
DoCmd.SetWarnings True
End If

End Sub





.



Relevant Pages

  • Re: Passing an argument from a query to a Macro
    ... The first thing to note is that the RunQuery procedure relates to which is a *select* query. ... Private Sub Reminder_Letter_Command_Click ... Dim SendTo As String ... MsgBox "This is stDocName Value " & stDocName ...
    (microsoft.public.access.macros)
  • Re: delet query password
    ... You then only run a temporary query, and have no permanent one in the ... Private Sub Run_Query_Click ... Dim Message, Title, Default, MyValue, stDocName ...
    (microsoft.public.access.queries)
  • Re: Help with code
    ... It looks from the code that you are actually running a query and that it is ... I would just add a check to the biginning of the Sub ... Dim stDocName As String ... inserting and where? ...
    (microsoft.public.access.formscoding)
  • filter on command
    ... Private Sub Command68_Click ... Dim stDocName As String ... stDocName = "FORM QUERY" ...
    (microsoft.public.access.formscoding)
  • UPDATE Query
    ... I am trying to write a query in access VBA. ... a count and inserting the figures into lots of different sub tables. ... ALL_ASD with the figures from S_OFSTED_ALL where the ethnicity fields ...
    (microsoft.public.access.queries)