Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / December 2004

Tip: Looking for answers? Try searching our database.

ISNULL  one last thing....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iam@notarealisp.com - 22 Dec 2004 23:01 GMT
Private Sub RecipeName_Exit(Cancel As Integer)
If IsNull(Me![RecipeName]) Then
       MsgBox "Please enter a Recipe Name."
       Cancel = True
       RecipeName.SetFocus
End If

Seems to be working in the Application just fine except for one thing.

When I switch from Form View to  Design View the Msg Box is coming up
every time. And it takes 2 clicks of the mouse to get rid of it.

A little bit of code causing so many unintended results.
John Vinson - 23 Dec 2004 00:30 GMT
>When I switch from Form View to  Design View the Msg Box is coming up
>every time. And it takes 2 clicks of the mouse to get rid of it.

Hit <Esc> twice before going into design view to cancel the current
record's update. On going into design view you ARE exiting the
control, so naturally the code will execute.

Users aren't going to be allowed to go into design view surely?

                 John W. Vinson[MVP]
iam@notarealisp.com - 23 Dec 2004 03:17 GMT
>>When I switch from Form View to  Design View the Msg Box is coming up
>>every time. And it takes 2 clicks of the mouse to get rid of it.
[quoted text clipped - 6 lines]
>
>                  John W. Vinson[MVP]    

No, I'm not allowing users to go into design view, it's just annoying
while I jump back and forth between the two views.

I guess I'll comment it out until I'm done with everything else.

Some day I'll marry a programmer girl and she'll have all this fun.
:)
Lynn Trapp - 23 Dec 2004 12:36 GMT
> Some day I'll marry a programmer girl and she'll have all this fun.
> :)

Or you might marry and English teacher who will say, "Don't explain how it
works, just make it work."

Signature

Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm

George Nicholson - 23 Dec 2004 18:21 GMT
... or a Manager who wants Psychic programs ("Why can't it just *know* what
I want it to do next, based on my mood, so i don't even have to push the
button?")

Gives new meaning to "artifical intelligence".

(and in no way, shape or form is this gender specific)

Signature

HTH,

George Nicholson
(Please post responses to newsgroup but remove "Junk" from return address if
used)

>> Some day I'll marry a programmer girl and she'll have all this fun.
>> :)
>
> Or you might marry and English teacher who will say, "Don't explain how it
> works, just make it work."
Tim Ferguson - 23 Dec 2004 18:41 GMT
>         Cancel = True
>         RecipeName.SetFocus
> End If

The call to the .SetFocus method is unneccessary and may be causing your
problems if it causes a recursive call back into the same Exit procedure.
Try removing it (the Cancel=True line is the one that does the work) and
see if one of your message boxes goes away.

All the best

Tim F
iam@notarealisp.com - 23 Dec 2004 20:31 GMT
>>         Cancel = True
>>         RecipeName.SetFocus
[quoted text clipped - 8 lines]
>
>Tim F

Removing that redundant focus call Cleaned up the code a bit but the
program still works the same. That field is now doing what I want it
to do.

Now if someone will answer my question about changing the gray color
on the subform......datasheet

I have the subform set to Datasheet View and that forces the unused
portion of the SubForm box to a crappy looking Gray color.  It
disappears when data items fill up the box but not until then.
Tim Ferguson - 24 Dec 2004 08:37 GMT
> I have the subform set to Datasheet View and that forces the unused
> portion of the SubForm box to a crappy looking Gray color.  It
> disappears when data items fill up the box but not until then.

Sounds like a Windows Control Panel setting: look in the Display Settings
and the Window Background colour (that's from memory, but it should be
somewhere around there).

HTH

Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.