Confused about where to put code

In a module I have a procedure called 'missingdata() that checks if certain 
form fields are filled. If not, the user is asked to first enter the fields. 
Missingdata() returns true if data is missing. If the fields �re filled the 
current record is being saved by:
if . dirty then .dirty = false.

I call this procedure every time I need to make that the record is complete 
and saved, for instance for composing an email which uses the field values. 
If missingsdata() returns true I quite the calling procedure.

Now in the form's beforeupdate I also call missingdata(), since if a user 
moves to another record I need to make sure the required fields are filled.

Since the .dirty part of missingdata() triggers the form's beforeupdate, I'm 
in a loop, because the beforeupdate triggers missingdata() again.

Can someone advise me on how to handle this issue?

Thanks,
Lars

 

0
Lars
2/26/2010 4:48:12 PM
access 16762 articles. 3 followers. Follow

11 Replies
760 Views

Similar Articles

[PageSpeed] 53

Lars -

You shouldn't have code .dirty = false in the BeforeUpdate event (e.g. not 
in your missingdata() procedure).  Instead, remove the .dirty = false line in 
your missingdata procedure, and where most code calls missingdata(), do this:

If not missingdata() then
   .dirty = false
End if

But in the BeforeUpdate event, just call missingdata(), as the .dirty will 
be handled by the update event.

-- 
Daryl S


"Lars Brownies" wrote:

> In a module I have a procedure called 'missingdata() that checks if certain 
> form fields are filled. If not, the user is asked to first enter the fields. 
> Missingdata() returns true if data is missing. If the fields áre filled the 
> current record is being saved by:
> if . dirty then .dirty = false.
> 
> I call this procedure every time I need to make that the record is complete 
> and saved, for instance for composing an email which uses the field values. 
> If missingsdata() returns true I quite the calling procedure.
> 
> Now in the form's beforeupdate I also call missingdata(), since if a user 
> moves to another record I need to make sure the required fields are filled.
> 
> Since the .dirty part of missingdata() triggers the form's beforeupdate, I'm 
> in a loop, because the beforeupdate triggers missingdata() again.
> 
> Can someone advise me on how to handle this issue?
> 
> Thanks,
> Lars
> 
>  
> 
> .
> 
0
Utf
2/26/2010 5:51:01 PM
> your missingdata procedure, and where most code calls missingdata(), do 
> this:
>
> If not missingdata() then
>   .dirty = false
> End if

Not sure I get this. In that case missingdata() will be called for the 
second time, as the .dirty = false line will trigger the beforeupdate which 
in turn calls missingdata again. That doesn't seem like proper coding.

Is that what you mean?

Lars


"Daryl S" <DarylS@discussions.microsoft.com> schreef in bericht 
news:4921CF7D-B947-4457-A1B1-E4842918A7F7@microsoft.com...
> Lars -
>
> You shouldn't have code .dirty = false in the BeforeUpdate event (e.g. not
> in your missingdata() procedure).  Instead, remove the .dirty = false line 
> in
> your missingdata procedure, and where most code calls missingdata(), do 
> this:
>
> If not missingdata() then
>   .dirty = false
> End if
>
> But in the BeforeUpdate event, just call missingdata(), as the .dirty will
> be handled by the update event.
>
> -- 
> Daryl S
>
>
> "Lars Brownies" wrote:
>
>> In a module I have a procedure called 'missingdata() that checks if 
>> certain
>> form fields are filled. If not, the user is asked to first enter the 
>> fields.
>> Missingdata() returns true if data is missing. If the fields áre filled 
>> the
>> current record is being saved by:
>> if . dirty then .dirty = false.
>>
>> I call this procedure every time I need to make that the record is 
>> complete
>> and saved, for instance for composing an email which uses the field 
>> values.
>> If missingsdata() returns true I quite the calling procedure.
>>
>> Now in the form's beforeupdate I also call missingdata(), since if a user
>> moves to another record I need to make sure the required fields are 
>> filled.
>>
>> Since the .dirty part of missingdata() triggers the form's beforeupdate, 
>> I'm
>> in a loop, because the beforeupdate triggers missingdata() again.
>>
>> Can someone advise me on how to handle this issue?
>>
>> Thanks,
>> Lars
>>
>>
>>
>> .
>> 
0
Lars
2/26/2010 6:56:11 PM
I think you'll find it easier if you keep the code to save the record  and
the validation routines separate.  Either declare the  MissingData function
as Boolean to return True or False, but not to set the Dirty property to
False, and in the form's BeforeUpdate event procedure put something like this:


Const MESSAGETEXT = _
    "Not all required fields have been completed."

If MissingData Then
    MsgBox MESSAGETEXT, vbExclamation, "Warning"
    Cancel = True
End If

Or declare it as Variant and get it to return the name of the first Null
control it finds and move the focus to that control:

Dim strMessage As String

If Not IsNull(MissingdData()) Then
   strMessage = "Field " & MissingdData() not entered."
    MsgBox strMessage, vbExclamation, "Warning"
    Cancel = True
    Me.Controls(MissingdData()).SetFocus
End If

If you want a means for the user to explicitly save a record then use a
button with code in its Click event procedure to do this.  The validation
routine will then kick in when the BeforeUpdate event is triggered.

This sort of thing is fine in itself if the user tries to save the current
record by moving to another record or explicitly with a button or from the
menu or by keystrokes, but if they attempt to do so by closing the form you
will also need to include some code in the form's UnLoad event to set the
return value of  its Cancel argument to True if the update is cancelled.
This is usually done by declaring a module level Boolean variable, e.g.
blnDontCloseMe, and setting its value to True if the data is not validated,
and back to False when the record is successfully saved or undone.  In the
Unload event procedure you can then put:

Cancel = blnDontCloseMe

You'll find it easier to handle if you force the user to close the form via a
command button rather than the form's built in close button as in a command
button's code you can make it conditional on the MissingdData() function
being False.  If you allow closure via the built in close button, even though
the validation routine kicks in the usual system message about not being able
to save the record is generated, so further steps are necessary to suppress
this.

Ken Sheridan
Stafford, England

Lars Brownies wrote:
>In a module I have a procedure called 'missingdata() that checks if certain 
>form fields are filled. If not, the user is asked to first enter the fields. 
>Missingdata() returns true if data is missing. If the fields áre filled the 
>current record is being saved by:
>if . dirty then .dirty = false.
>
>I call this procedure every time I need to make that the record is complete 
>and saved, for instance for composing an email which uses the field values. 
>If missingsdata() returns true I quite the calling procedure.
>
>Now in the form's beforeupdate I also call missingdata(), since if a user 
>moves to another record I need to make sure the required fields are filled.
>
>Since the .dirty part of missingdata() triggers the form's beforeupdate, I'm 
>in a loop, because the beforeupdate triggers missingdata() again.
>
>Can someone advise me on how to handle this issue?
>
>Thanks,
>Lars

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/201002/1

0
KenSheridan
2/26/2010 7:09:12 PM
On Fri, 26 Feb 2010 17:48:12 +0100, "Lars Brownies" <Lars@Browniew.com> wrote:

>Since the .dirty part of missingdata() triggers the form's beforeupdate, I'm 
>in a loop, because the beforeupdate triggers missingdata() again.
>
>Can someone advise me on how to handle this issue?

In the BeforeUpdate event, don't mess with the .dirty property at all; just
set Cancel to true with a warning message if the record is incomplete.

If you want to keep the code in missingdata(), pass it an argument to specify
whether or not to save the record.
-- 

             John W. Vinson [MVP]
0
John
2/26/2010 7:30:21 PM
Lars -

You are right in that the missingdata() will be called again in this case, 
but I left that in place because you indicated there were several places 
where you would call the missingdata() from other than moving to the next 
record.  If you always make sure any saved record passes the missingdata(), 
then I would only put the missingdata() on the BeforeUpdate.  If however you 
have current data that does not pass the missingdata, and that record does 
not change, but a user wants to send the data, then you must also test for 
missingdata at this point, because the record will not be dirty.

This will not cause a loop, as your prior code would.  If my assumptions on 
your data are wrong, by all means code to the correct assumptions, and only 
put the missingdata() in the BeforeUpdate.

-- 
Daryl S


"Lars Brownies" wrote:

> > your missingdata procedure, and where most code calls missingdata(), do 
> > this:
> >
> > If not missingdata() then
> >   .dirty = false
> > End if
> 
> Not sure I get this. In that case missingdata() will be called for the 
> second time, as the .dirty = false line will trigger the beforeupdate which 
> in turn calls missingdata again. That doesn't seem like proper coding.
> 
> Is that what you mean?
> 
> Lars
> 
> 
> "Daryl S" <DarylS@discussions.microsoft.com> schreef in bericht 
> news:4921CF7D-B947-4457-A1B1-E4842918A7F7@microsoft.com...
> > Lars -
> >
> > You shouldn't have code .dirty = false in the BeforeUpdate event (e.g. not
> > in your missingdata() procedure).  Instead, remove the .dirty = false line 
> > in
> > your missingdata procedure, and where most code calls missingdata(), do 
> > this:
> >
> > If not missingdata() then
> >   .dirty = false
> > End if
> >
> > But in the BeforeUpdate event, just call missingdata(), as the .dirty will
> > be handled by the update event.
> >
> > -- 
> > Daryl S
> >
> >
> > "Lars Brownies" wrote:
> >
> >> In a module I have a procedure called 'missingdata() that checks if 
> >> certain
> >> form fields are filled. If not, the user is asked to first enter the 
> >> fields.
> >> Missingdata() returns true if data is missing. If the fields áre filled 
> >> the
> >> current record is being saved by:
> >> if . dirty then .dirty = false.
> >>
> >> I call this procedure every time I need to make that the record is 
> >> complete
> >> and saved, for instance for composing an email which uses the field 
> >> values.
> >> If missingsdata() returns true I quite the calling procedure.
> >>
> >> Now in the form's beforeupdate I also call missingdata(), since if a user
> >> moves to another record I need to make sure the required fields are 
> >> filled.
> >>
> >> Since the .dirty part of missingdata() triggers the form's beforeupdate, 
> >> I'm
> >> in a loop, because the beforeupdate triggers missingdata() again.
> >>
> >> Can someone advise me on how to handle this issue?
> >>
> >> Thanks,
> >> Lars
> >>
> >>
> >>
> >> .
> >> 
> .
> 
0
Utf
2/26/2010 8:16:11 PM
Thanks all for your replies. I'm sorry but I still find this hard to 
understand. Maybe I can make myself more clear. I now have:

1. In form's beforeupdate I check for missing data. If true then cancel = 
true
2. In a mail-button I save the current record with if me.dirty then me.dirty 
= false
3. The dirty = false triggers the form's beforeupdate
4. With missing data in the beforeupdate, this event gets canceled
5. This cancelation causes error 2101 on the earlier mentioned dirty = false 
line

Error 2101: The parameter you have given, is invalid for this property.

I could do an extra missingdata check before the dirty = false and stop the 
code from there. But, apart from that I don't really like this solution, 
this causes another problem: I have several functions that are called from a 
menu. When editing a field value and then choosing a menu item the focus 
doesn't move off of the active field. The field doesn't hold the new value 
yet. I'm forced to first save the record with dirty = false and I can't 
first run the missingdata procedure as this may nog give the right result.

Btw: records should be saved without asking the user.

Lars


"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> schreef in bericht 
news:088go5lf07a9dg1ea56u31mlddtd0s1e2r@4ax.com...
> On Fri, 26 Feb 2010 17:48:12 +0100, "Lars Brownies" <Lars@Browniew.com> 
> wrote:
>
>>Since the .dirty part of missingdata() triggers the form's beforeupdate, 
>>I'm
>>in a loop, because the beforeupdate triggers missingdata() again.
>>
>>Can someone advise me on how to handle this issue?
>
> In the BeforeUpdate event, don't mess with the .dirty property at all; 
> just
> set Cancel to true with a warning message if the record is incomplete.
>
> If you want to keep the code in missingdata(), pass it an argument to 
> specify
> whether or not to save the record.
> -- 
>
>             John W. Vinson [MVP] 

0
Lars
2/26/2010 10:11:58 PM
On Fri, 26 Feb 2010 23:11:58 +0100, "Lars Brownies" <Lars@Browniew.com> wrote:

>Thanks all for your replies. I'm sorry but I still find this hard to 
>understand. Maybe I can make myself more clear. I now have:
>
>1. In form's beforeupdate I check for missing data. If true then cancel = 
>true
>2. In a mail-button I save the current record with if me.dirty then me.dirty 
>= false
>3. The dirty = false triggers the form's beforeupdate
>4. With missing data in the beforeupdate, this event gets canceled
>5. This cancelation causes error 2101 on the earlier mentioned dirty = false 
>line
>
>Error 2101: The parameter you have given, is invalid for this property.

Please post your current actual code for the mail button, the BeforeUpdate
event, and the missingdata function.
-- 

             John W. Vinson [MVP]
0
John
2/26/2010 10:22:46 PM
Simplified but with the same outcome:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(LastName) Or LastName = "" Then
  Cancel = True
End If
End Sub


Private Sub btnMail_Click()
On Error GoTo Err_handler

'Make sure all needed values are saved
'On the last part of this line the error occurs
'as the beforeupdate is canceled
If Me.Dirty Then Me.Dirty = False

'other code

Exit_Sub:
  Exit Sub
Err_handler:
  MsgBox "Error " & Err.Number & " (" & Err.Description & ") "
  Resume Exit_Sub
End Sub

I don't use a missingdata function anymore, but that hasn't solved the 
problem yet.

Lars

"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> schreef in bericht 
news:ccigo55v242lf0f4ufue163uct9ajhvso2@4ax.com...
> On Fri, 26 Feb 2010 23:11:58 +0100, "Lars Brownies" <Lars@Browniew.com> 
> wrote:
>
>>Thanks all for your replies. I'm sorry but I still find this hard to
>>understand. Maybe I can make myself more clear. I now have:
>>
>>1. In form's beforeupdate I check for missing data. If true then cancel =
>>true
>>2. In a mail-button I save the current record with if me.dirty then 
>>me.dirty
>>= false
>>3. The dirty = false triggers the form's beforeupdate
>>4. With missing data in the beforeupdate, this event gets canceled
>>5. This cancelation causes error 2101 on the earlier mentioned dirty = 
>>false
>>line
>>
>>Error 2101: The parameter you have given, is invalid for this property.
>
> Please post your current actual code for the mail button, the BeforeUpdate
> event, and the missingdata function.
> -- 
>
>             John W. Vinson [MVP] 

0
Lars
2/26/2010 10:51:34 PM
You could make the code conditional in the btnMail control's event procedure:

If Nz(Me.LastName,"") <> "" Then
    Me.Dirty = False 
    'other code
Else
   MsgBox "Please insert last name.", vbExclamation, "Invalid Operation"
End If

Ken Sheridan
Stafford, England

Lars Brownies wrote:
>Simplified but with the same outcome:
>
>Private Sub Form_BeforeUpdate(Cancel As Integer)
>If IsNull(LastName) Or LastName = "" Then
>  Cancel = True
>End If
>End Sub
>
>Private Sub btnMail_Click()
>On Error GoTo Err_handler
>
>'Make sure all needed values are saved
>'On the last part of this line the error occurs
>'as the beforeupdate is canceled
>If Me.Dirty Then Me.Dirty = False
>
>'other code
>
>Exit_Sub:
>  Exit Sub
>Err_handler:
>  MsgBox "Error " & Err.Number & " (" & Err.Description & ") "
>  Resume Exit_Sub
>End Sub
>
>I don't use a missingdata function anymore, but that hasn't solved the 
>problem yet.
>
>Lars
>
>>>Thanks all for your replies. I'm sorry but I still find this hard to
>>>understand. Maybe I can make myself more clear. I now have:
>[quoted text clipped - 14 lines]
>> Please post your current actual code for the mail button, the BeforeUpdate
>> event, and the missingdata function.

-- 
Message posted via http://www.accessmonster.com

0
KenSheridan
2/26/2010 11:38:21 PM
This is the solution I mentioned earlier, but it doesn't work for procedures 
called by a menu item. From the earlier post:

"I could do an extra missingdata check before the dirty = false and stop the
code from there. But, apart from that I don't really like this solution,
this causes another problem: I have several functions that are called from a
menu. When editing a field value and then choosing a menu item the focus
doesn't move off of the active field. The field doesn't hold the new value
yet. I'm forced to first save the record with dirty = false and I can't
first run the missingdata procedure as this may nog give the right result."

Lars


"KenSheridan via AccessMonster.com" <u51882@uwe> schreef in bericht 
news:a43b6f9d117e5@uwe...
> You could make the code conditional in the btnMail control's event 
> procedure:
>
> If Nz(Me.LastName,"") <> "" Then
>    Me.Dirty = False
>    'other code
> Else
>   MsgBox "Please insert last name.", vbExclamation, "Invalid Operation"
> End If
>
> Ken Sheridan
> Stafford, England
>
> Lars Brownies wrote:
>>Simplified but with the same outcome:
>>
>>Private Sub Form_BeforeUpdate(Cancel As Integer)
>>If IsNull(LastName) Or LastName = "" Then
>>  Cancel = True
>>End If
>>End Sub
>>
>>Private Sub btnMail_Click()
>>On Error GoTo Err_handler
>>
>>'Make sure all needed values are saved
>>'On the last part of this line the error occurs
>>'as the beforeupdate is canceled
>>If Me.Dirty Then Me.Dirty = False
>>
>>'other code
>>
>>Exit_Sub:
>>  Exit Sub
>>Err_handler:
>>  MsgBox "Error " & Err.Number & " (" & Err.Description & ") "
>>  Resume Exit_Sub
>>End Sub
>>
>>I don't use a missingdata function anymore, but that hasn't solved the
>>problem yet.
>>
>>Lars
>>
>>>>Thanks all for your replies. I'm sorry but I still find this hard to
>>>>understand. Maybe I can make myself more clear. I now have:
>>[quoted text clipped - 14 lines]
>>> Please post your current actual code for the mail button, the 
>>> BeforeUpdate
>>> event, and the missingdata function.
>
> -- 
> Message posted via http://www.accessmonster.com
> 
0
Lars
2/27/2010 7:28:16 AM
I found the following code by Allen Browne which traps the error and seems 
to work in my particular case (activating functions from menu items).

Function CannotSave(frm as Form) As Boolean
On Error GoTo Err_CannotSave
    'Purpose:   Save the record in the form.
    'Return:    True if the record cannot be saved.
    If frm.Dirty Then
        frm.Dirty = False
    End If
Exit_CannotSave:
    Exit Function
Err_CannotSave:
    If Err.Number <> 2101 Then
        MsgBox "Error " & Err.Number & " " & Err.Description, _
          vbExclamation, "CannotSave"
    End If
    CannotSave = True
    Resume Exit_CannotSave
End Function

Thanks for your input.
Lars


"Lars Brownies" <Lars@Browniew.com> schreef in bericht 
news:hmahig$2jpk$1@textnews.wanadoo.nl...
> This is the solution I mentioned earlier, but it doesn't work for 
> procedures called by a menu item. From the earlier post:
>
> "I could do an extra missingdata check before the dirty = false and stop 
> the
> code from there. But, apart from that I don't really like this solution,
> this causes another problem: I have several functions that are called from 
> a
> menu. When editing a field value and then choosing a menu item the focus
> doesn't move off of the active field. The field doesn't hold the new value
> yet. I'm forced to first save the record with dirty = false and I can't
> first run the missingdata procedure as this may nog give the right 
> result."
>
> Lars
>
>
> "KenSheridan via AccessMonster.com" <u51882@uwe> schreef in bericht 
> news:a43b6f9d117e5@uwe...
>> You could make the code conditional in the btnMail control's event 
>> procedure:
>>
>> If Nz(Me.LastName,"") <> "" Then
>>    Me.Dirty = False
>>    'other code
>> Else
>>   MsgBox "Please insert last name.", vbExclamation, "Invalid Operation"
>> End If
>>
>> Ken Sheridan
>> Stafford, England
>>
>> Lars Brownies wrote:
>>>Simplified but with the same outcome:
>>>
>>>Private Sub Form_BeforeUpdate(Cancel As Integer)
>>>If IsNull(LastName) Or LastName = "" Then
>>>  Cancel = True
>>>End If
>>>End Sub
>>>
>>>Private Sub btnMail_Click()
>>>On Error GoTo Err_handler
>>>
>>>'Make sure all needed values are saved
>>>'On the last part of this line the error occurs
>>>'as the beforeupdate is canceled
>>>If Me.Dirty Then Me.Dirty = False
>>>
>>>'other code
>>>
>>>Exit_Sub:
>>>  Exit Sub
>>>Err_handler:
>>>  MsgBox "Error " & Err.Number & " (" & Err.Description & ") "
>>>  Resume Exit_Sub
>>>End Sub
>>>
>>>I don't use a missingdata function anymore, but that hasn't solved the
>>>problem yet.
>>>
>>>Lars
>>>
>>>>>Thanks all for your replies. I'm sorry but I still find this hard to
>>>>>understand. Maybe I can make myself more clear. I now have:
>>>[quoted text clipped - 14 lines]
>>>> Please post your current actual code for the mail button, the 
>>>> BeforeUpdate
>>>> event, and the missingdata function.
>>
>> -- 
>> Message posted via http://www.accessmonster.com
>> 
0
Lars
2/27/2010 9:24:43 AM
Reply:

Similar Artilces:

quick code for saving email attachments
Hi All, I'm looking for a quick example code that scans my Inbox for emails and if it finds emails from Sender: X or Y it has to save (not rip) the attachments from that emails to a folder on my HDD and move the email to a specific folder under my Inbox. Does anyone have such a tool at hand? Regards Marco The Netherlands p.s. must work under Outlook 2000 or Access 97 Co <vonclausowitz@gmail.com> wrote: > I'm looking for a quick example code that scans my Inbox for emails > and if it finds emails > from Sender: X or Y it has to save (not rip) the attachments from th...

Error Code 0x802246008 Install Failure
I am using Windows I.E. 8. Version 8.0.6001.18702ic and Windows XP Professional Version 5.1.2600 SP 3 Build 2600. For the last few weeks I have been unable to download any Microsoft updates. I have tried various remedies i.e. registering Wups 2.dll and running Bits which showed Error 126. I now have 41 critical updates to download. Can anyone please help. -- andy Recheck your error code. It has 9 characters, but error codes cannot exceed 8. It would also be useful if you identified in the body of the message the error code and where in the install log the error happened....

Error Code 0x 80040200
I am getting this error while registering the DLL to registry. I have created a COM dll(using VC++ 6.0), and registering using regsvr32.exe Please help me out From WinError.h // // MessageId: CO_E_FAILEDTOIMPERSONATE // // MessageText: // // Unable to impersonate DCOM client // #define CO_E_FAILEDTOIMPERSONATE _HRESULT_TYPEDEF_(0x80040200L) This is a security issue. What version of Windows are you running, and what account are you running under? (admin/non-admin) joe On Fri, 13 Apr 2007 02:38:00 -0700, Vinod <Vinod@discussions.microsoft.com> wrote: >I am getti...

date
cpearson directed me to working code to correctly parse the time and date formats.. it works great when only either date or time is used as a worksheet_change. How can I add a second worksheet_change for the cells that have date? (the time cells already have the procedure) Thanks chuck... wonderful site You only get one worksheet_change event per worksheet. But you could do different things if you can define when times or dates should be applied. For instance, if the dates go in column A and the times go in column B, you could set up the code that way. Kind of... Option Explicit Privat...

Phone number input mask with default area code
I can't seem to get the right combination with an input mask that has a default area code but lets the user change it if necessary. Any help would be appreciated. Please pardon if this is a duplicate post. I posted yesterday but can't find it! Thanks! Marty On Tue, 13 Apr 2010 20:11:01 -0700, MartyO <MartyO@discussions.microsoft.com> wrote: >I can't seem to get the right combination with an input mask that has a >default area code but lets the user change it if necessary. That's because it cannot be done with an input mask. Input masks are...

Zip codes that start with zero
I can format the cell as text in Excel and the zeros show up and print fine, but when I mail merge into WORD, I get a zero ONLY as a zipcode. Frustrating. I need to print labels by Friday. WHat do I do? See if this link helps: http://office.microsoft.com/en­-ca/assistance/HA011164951033.­aspx -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Gamba Lisa" <Gamba Lisa@discussions.m...

Bar codes in GP reports
Can someone offer insight as to how to include bar codes in Great Plains reports and documents, especially invoices and PO's? I know there are some true-type font packages out there, and have been experimenting with them through excel, word, etc. I have not tried them yet in GP, but was wondering if there are any tricks, tips, or traps to making them work. We are using GP 7.5, soon to upgrade to 8.0. Thanks for your help. Greg W We do a lot of utility and tax billing using the "3 of 9" bar code font. Make sure you test if with the reader you are using as some variances...

VBA code question?
Hi everyone, I have this simple 3 subs vba code. It runs 8 times and each solution has 24 values that is put in one column of 24 raws. So, the 1st solution found gets written at N2 to N25....and so on. The problem I have is this: The 1st solution that gets written from N2-N25, later it gets removed; just the 1st solution! What could be causing this in the code? Thanks in advance. Option Explicit Option Base 1 Sub Pareto() Dim cell As Range, ModelCounter As Integer, JobNr As Integer Dim ret As Integer Dim ARngSolution As Range Application.ScreenUpdating = False ModelCou...

vaccinations for influenza what is the code
WHAT IS THE NAPPI CODE AND ICD10 FOR FLU VACCINATIONS ...

"hidden"codes "paragraph" symbol, etc, showing in doc-how delete?
have normally "hidden" codes, such as "paragraph" symbols, "arrow head pointers" and "indentation markers" showing up in MS wWord document previously typed WITHOUT SUCH SYMBOLS SHOWING. How do I get rid of them. They do not show when documetn is printed. But code symbols make editing document a real headache. I know there is some simple key to depress which will send them back into "hiding." But which key ? And how to prevent reoccurences of same 'hidden codes' "popping up" in document. Thanks any help. ...

Is it possible to put two different files of excel on the same scr
I have been using Windows 7 heavily for its feature to use two different programs at once by sliding them to opposite sides of the screen. I can open 2 different files for word and compare them on the screen, but not excel. When I do this with excel, wherever I move the 1st file I opened will be where the second will be, so no possibilty of comparing to excel files. I recently downloaded the Office 2010 beta and this still seems to be the case. Is there any way of running comparing two different excel files side-by-side? Window>New Window Window>Arrange>Vertical ...

How do I stop Word putting text at bottom of page onto next page?
Word pushes some text at the bottom of the page onto the next page, thereby creating a gap at the bottom of the page. How do I get Word to stop doing this? The following settings may be relevant in such a case: "Keep with next," "Keep lines together," and "Widow/orphan control" (all found in the Paragraph dialog box). Note, however, that the best way to deal with this depends on what kind of a document you are creating. Is it a numbered outline of heading styles? A document with footnotes in it? -- Stefan Blom Microsoft Word MVP &quo...

Code for eConnect
Private Function fncSettingCust(ByVal strNumber As String, ByVal strName As String, ByVal strAddrCode As String, _ ByVal strClass As String, ByVal strBTAddrCode As String, ByVal strBTAddr1 As String, ByVal strBTAddr2 As String, _ ByVal strBTCity As String, ByVal strBTState As String, ByVal strBTPostalCode As String, ByVal strBTCountry As String, _ ByVal strBTPhone1 As String, ByVal strBTPhone2 As String, ByVal strBTPhone3 As String, ByVal strBTFax As String, _ ByVal strSTAddrCode As String, ByVal strSTAddr1 As String, _ ByVal strSTAddr2 As String, ByVal strSTCity As String,...

Lookup code working in RMS
Hi all, I m going to implement SO in Garments store.They are already using Look up code. Let me explain how they r. Here is the look up code example: 12122 0202 101 The first 5 digits represent item code, 2nd represent color code, 3 represent fabric code.How RMS can handle this look up code.can any1 explain me??We have Deparment & category in item maintenance form.I guess we have to make setups for COLOR & FABRIC . wat would u suggest? -- With Regards Junaid Idrees Associate Project Manager Enterprise Business Solutions 4th Floor mehdi towers,shahra-e-faisal karachi,Pakistan....

Validation code for macro to run
Hi...the code below works fine, but how do I change it so that it doesn't look for a blank cell (""), but looks for specific text in a cell? There is an If formula in cell C269 so that if 2 figures balance then this cell displays "TRUE", otherwise it displays "FALSE". The code mustn't run if Cell C269 displays "FALSE". If [C269] = "" Then MsgBox "The figures don't balance!!" Exit Sub End If Range("E1:E48").Select Selection.Copy End Sub Thanks. Rob Rob, try this, If [C269] =...

Code generation with types from other schemas
I want to be able to define types in one schema, and then use them in other schemas. So far so good. Now I also want to be able to generate classes from these schemas and use them independantly, and in their own namespaces. For example, schema1.xsd ==> schema1.cs schema2.xsd ==> schema2.cs where there are types from schema1 used in schema2. When I use xsd.exe to generate schema2.cs and an <xs:import> element, it works, but also regenerates the types from the schema1.cs. I guess the question is, is there a simple way to generate code for what I'm trying to do, or do I n...

RMS should show what bar code it is going to print
Okk when a item is made in RMS and the customer makes his own barcode and selects a barcode format to print it should show at the bottom of the screen what barcode is being created(as in the case of UPC, EAN it has a check Digit) That way the customer can put in the check digit in the number so it will scann after printing. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the...

code or macro that would save data then clear form
I have a form built that I would like to ba able to create a database of saved data from before excuting my clear reset macro. Example would be: Transfer data from my form, save on the next available row in another worksheet then clear form. Any ideas? I'd start on Debra Dalgleish's site: http://contextures.com/xlForm02.html and you didn't ask for this: http://contextures.com/xlForm03.html Japs wrote: > > I have a form built that I would like to ba able to create a database of > saved data from before excuting my clear reset macro. > Example would be: > Transf...

SQL Server failed with error code 0xc0000000 to spawn a thread
Please help me resolve the error listed below that I received yeseterday from one of my SQL Server 2005 database servers. Error: SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Thanks, Joe K. (JoeK@discussions.microsoft.com) writes: > Please help me resolve the error listed below that I received yeseterday > from one of my SQL Server 2005 database servers. > > Error: > SQL Server failed with error code 0xc0000000 to spawn a thread to > process a new login or connection. That looks bad. Do you ...

Calling GP existing report from vba code
Dear All, Can anyone show me that how to call the GP reports from VBA code. Best Regards, -- Habeeb. ...

Notes color coding
Looking for a way to color code handwritten notes sync'd from my PDA. It look like IPM.Stickynotes are not color codeable. Is that correct? TIA Rick they support 5 or 6 colors - but I don't recall if the colors are synced with a pda (I usually use yellow for everything.) -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipst...

Formula or code?
I have 3 bits of data. I need it to check the entire column to see if any of the data matches and it so provide a EC-x in the appropriate col so in the example below. Col1 Col2 Col3 Row 1 EC QWERTY POIUY Row 2 (EC-x) ZXCVB QWERTY RO3 EC lkjhg ZXCVB ..... Row 4 (EC-x) rtyui QWERTY Ro4 (EC-X) asdfg lkjhg After it has placed the EC-x into the fields i want to be able to replicate the formula to check if there is a EC-x ...

embedding a bitmap image to bound oleobject control via code
Dear friends, I am a user of Acc2003. I have a control of type Bound object frame on my form which is bound to a field of type OLE Object. What I want is: Open the FileDialog by double clicking on the ole object and thus obtaining the name and path of the bitmap. Once I get this string I'd like to use it to place the bitmap image into OLE object. I intercept the double click event of the ole object to call a function which opens FileDialog and returns the path and name of the users selection. From then on however I could not figure out what to do. Any suggestions? Thanks in advance ...

Capture Item Lookup Code before it goes on POS screen!
I'm doing little customization for RMS POS. I need to get Item lookup code before it goes on POS transaction screen. In other words when I type item number in POS screen and press enter, I need to intercept and get that number before RMS searches that item through inventory and adds to transaction entry. If I use this mySession.Transaction.Entries.Element(I).Item.Description I get what I need but only after item is on transaction screen Appreciate your response Thanks, ...

Visio Version Confusion
Hello. We're a MS partner, and we get all the MSDN CDs on a regular basis. Currently we are making a push to get all of our .NET developers onto the same version of Visio. I thought we ought to make it the most recent version. The most recent CD I could find in MSDN was Jan 2004 and is titled exactly "Microsoft Office Visio Professional 2003". I installed it, it works great, but my boss tells me that it is missing some features that he was after. One example he gave me was Reports. When I go to Tools >> Reports all I get is one report (inventry.vrd). If instead of this ver...