PC Review


Reply
Thread Tools Rate Thread

acDialog - Form Invisible?

 
 
Faraz Ahmed Qureshi
Guest
Posts: n/a
 
      1st Jun 2010
ACCESS2007

The code was working well:

Private Sub Login_id_NotInList(NewData As String, Response As Integer)
On Error GoTo NtInList_Err
Dim intAnswer As Integer
intAnswer = MsgBox("The login ID " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbYesNo, "BC")
If intAnswer = vbYes Then
DoCmd.OpenForm "User", , , , acFormAdd, acDialog
Form_User.Login_id = NewData
Response = acDataErrAdded
Else
MsgBox "Please choose a name from the list." _
, vbInformation, "BC"
Response = acDataErrContinue
End If
NtInList_Exit:
Exit Sub
NtInList_Err:
MsgBox Err.Description, vbCritical, "Error"
Resume NtInList_Exit
End Sub

But now the FORM "USER" doesn't appear and the database seems to be hanged.
However, upon Tab, the field names seem to be appearing on the bottom bar?
--
Thanx & Best Regards,

Faraz!
 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      1st Jun 2010
On Tue, 1 Jun 2010 00:11:01 -0700, Faraz Ahmed Qureshi
<(E-Mail Removed)> wrote:

I doubt that very much. What you are attempting to do is to first open
form User in dialog mode, then on the next line set the Login_id. That
next line won't run until AFTER the form closes, so it is not a good
way to pass information to the form. Use the OpenArgs argument of
DoCmd.Openform instead.
Secondly acFormAdd depends on several conditions. For a test remove
this argument. Also check that the form uses an updatable recordset
(if not, can't acformadd, right?) and that the form's AllowAdditions
property is set to True.

-Tom.
Microsoft Access MVP


>ACCESS2007
>
>The code was working well:
>
>Private Sub Login_id_NotInList(NewData As String, Response As Integer)
> On Error GoTo NtInList_Err
> Dim intAnswer As Integer
> intAnswer = MsgBox("The login ID " & Chr(34) & NewData & _
> Chr(34) & " is not currently listed." & vbCrLf & _
> "Would you like to add it to the list now?" _
> , vbYesNo, "BC")
> If intAnswer = vbYes Then
> DoCmd.OpenForm "User", , , , acFormAdd, acDialog
> Form_User.Login_id = NewData
> Response = acDataErrAdded
> Else
> MsgBox "Please choose a name from the list." _
> , vbInformation, "BC"
> Response = acDataErrContinue
> End If
>NtInList_Exit:
> Exit Sub
>NtInList_Err:
> MsgBox Err.Description, vbCritical, "Error"
> Resume NtInList_Exit
>End Sub
>
>But now the FORM "USER" doesn't appear and the database seems to be hanged.
>However, upon Tab, the field names seem to be appearing on the bottom bar?

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change position of acDialog form MacDermott Microsoft Access Form Coding 9 12th Apr 2010 09:06 AM
acDialog form won't accept mouse input? Jack Leach Microsoft Access VBA Modules 7 28th Aug 2009 02:23 PM
Return a value from a form opened as acDialog David H Microsoft Access VBA Modules 7 24th Feb 2009 02:47 PM
Can I get scrollbars on a form in AcDialog? Stapes Microsoft Access Forms 1 7th Feb 2008 10:53 AM
Need a way around opening form in acDialog mode Diarmuid Microsoft Access Forms 2 17th Mar 2004 09:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:07 PM.