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 / General 2 / May 2008

Tip: Looking for answers? Try searching our database.

help with code...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred - 27 May 2008 18:16 GMT
hi... i want this code record fields(nome,IPCMref and POTdec),only with is
not exist in table...the problem is that code record fields, when this
fields exist in table, other problem is the button cancel in the msgbox, i
want this button cancel return to the form without record..but this not
happening.
the code is:

nome.SetFocus
If nome.Text = "" Then
MsgBox "Necessita de preencher todos os campos.", vbInformation
Else
If IPCMref2.Value = "" Then
MsgBox "Necessita de preencher todos os campos.", vbInformation
Else
If POTdec2.Value = "" Then
MsgBox "Necessita de preencher todos os campos.", vbInformation
Else
If Me.[nome] = DLookup("[Nome do Parque]", "[Consulta_parque]") Then
MsgBox "O Parque já se encontra adicionado.", vbInformation
Else
If MsgBox("Deseja adicionar o Parque?", vbQuestion + vbOKCancel) = vbCancel
Then
Cancel = True
     Else
    If Me.Dirty Then Me.Dirty = False
DoCmd.RunCommand acCmdRecordsGoToNew
 DoCmd.Close
  DoCmd.OpenForm "input"
    DoCmd.Close
     DoCmd.OpenForm "apresentacao", acNormal

thanks

Fred
Nicholas Meyer - 27 May 2008 23:16 GMT
gj
> hi... i want this code record fields(nome,IPCMref and POTdec),only with is
> not exist in table...the problem is that code record fields, when this
[quoted text clipped - 31 lines]
>
> Fred
 
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.