Connecting Tech Pros Worldwide Help | Site Map

Opens forms without scroll boxes

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 10:04 AM
tina.boroff@gmail.com
Guest
 
Posts: n/a
Default Opens forms without scroll boxes

Hello Everyone, I have a database that I am plodding through (new user)
and have an issue. I have a form that has combo boxes that look up
data from another table. However, if the data (insurance company
names) is not in the drop down box we want to be able to add it. I
have set up a Not in List for this. It works fine. My problem is that
when it opens up the second form it does not offer me scroll bars and
the form actually comes up too large (the users can not even get to the
buttons at the bottom of the screen. Here is the code I am using. Any
ideas would be a major help. This is the last issue I am facing.

Private Sub InsuranceCompanyLookup_NotInList(NewData As String,
Response As _
Integer)
Dim Result
Dim Msg As String
Dim CR As String

CR = Chr$(13)

If NewData = "" Then Exit Sub
Msg = "'" & NewData & "' is not in the list." & CR & CR
Msg = Msg & "Do you want to add it?"
If MsgBox(Msg, vbQuestion + vbYesNo) = vbYes Then

DoCmd.OpenForm "CCForm", , , , acAdd, acDialog, NewDat
End If
Result = DLookup("[CompanyName]", "CCTable", _
"[CompanyName]='" & NewData & "'")
If IsNull(Result) Then
MsgBox "Please try again!"
Else
Response = acDataErrAdded
End If
End Sub


  #2  
Old November 13th, 2005, 10:04 AM
David Lloyd
Guest
 
Posts: n/a
Default Re: Opens forms without scroll boxes

Have you checked the ScrollBars property of the form (under the Format tab).
The form size can be adjusted in Design view.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


<tina.boroff@gmail.com> wrote in message
news:1116424603.773446.318780@g49g2000cwa.googlegr oups.com...
Hello Everyone, I have a database that I am plodding through (new user)
and have an issue. I have a form that has combo boxes that look up
data from another table. However, if the data (insurance company
names) is not in the drop down box we want to be able to add it. I
have set up a Not in List for this. It works fine. My problem is that
when it opens up the second form it does not offer me scroll bars and
the form actually comes up too large (the users can not even get to the
buttons at the bottom of the screen. Here is the code I am using. Any
ideas would be a major help. This is the last issue I am facing.

Private Sub InsuranceCompanyLookup_NotInList(NewData As String,
Response As _
Integer)
Dim Result
Dim Msg As String
Dim CR As String

CR = Chr$(13)

If NewData = "" Then Exit Sub
Msg = "'" & NewData & "' is not in the list." & CR & CR
Msg = Msg & "Do you want to add it?"
If MsgBox(Msg, vbQuestion + vbYesNo) = vbYes Then

DoCmd.OpenForm "CCForm", , , , acAdd, acDialog, NewDat
End If
Result = DLookup("[CompanyName]", "CCTable", _
"[CompanyName]='" & NewData & "'")
If IsNull(Result) Then
MsgBox "Please try again!"
Else
Response = acDataErrAdded
End If
End Sub


  #3  
Old November 13th, 2005, 10:04 AM
tina.boroff@gmail.com
Guest
 
Posts: n/a
Default Re: Opens forms without scroll boxes

David

THanks for the reply.

The problem is that when the form is opened normally (even out of the
switchboard) it is fine. The scroll bars that are set in the form
appear and the size is correct. The only time I have an issue with the
form is when I open it using the code I posted. I actually use this
code for 3 boxes and all of the forms open in this manner.

Thanks
Tina
David Lloyd wrote:[color=blue]
> Have you checked the ScrollBars property of the form (under the[/color]
Format tab).[color=blue]
> The form size can be adjusted in Design view.
>
> --
> David Lloyd
> MCSD .NET
> http://LemingtonConsulting.com
>
> This response is supplied "as is" without any representations or[/color]
warranties.[color=blue]
>
>
> <tina.boroff@gmail.com> wrote in message
> news:1116424603.773446.318780@g49g2000cwa.googlegr oups.com...
> Hello Everyone, I have a database that I am plodding through (new[/color]
user)[color=blue]
> and have an issue. I have a form that has combo boxes that look up
> data from another table. However, if the data (insurance company
> names) is not in the drop down box we want to be able to add it. I
> have set up a Not in List for this. It works fine. My problem is[/color]
that[color=blue]
> when it opens up the second form it does not offer me scroll bars and
> the form actually comes up too large (the users can not even get to[/color]
the[color=blue]
> buttons at the bottom of the screen. Here is the code I am using.[/color]
Any[color=blue]
> ideas would be a major help. This is the last issue I am facing.
>
> Private Sub InsuranceCompanyLookup_NotInList(NewData As String,
> Response As _
> Integer)
> Dim Result
> Dim Msg As String
> Dim CR As String
>
> CR = Chr$(13)
>
> If NewData = "" Then Exit Sub
> Msg = "'" & NewData & "' is not in the list." & CR & CR
> Msg = Msg & "Do you want to add it?"
> If MsgBox(Msg, vbQuestion + vbYesNo) = vbYes Then
>
> DoCmd.OpenForm "CCForm", , , , acAdd, acDialog, NewDat
> End If
> Result = DLookup("[CompanyName]", "CCTable", _
> "[CompanyName]='" & NewData & "'")
> If IsNull(Result) Then
> MsgBox "Please try again!"
> Else
> Response = acDataErrAdded
> End If
> End Sub[/color]

  #4  
Old November 13th, 2005, 10:04 AM
Jana
Guest
 
Posts: n/a
Default Re: Opens forms without scroll boxes

Tina:

Your problem lies in the acDialog argument in your OpenForm line. This
argument changes the form to open in a special way that changes how it
looks and works. Take a look at the OpenForm Action and the Modal and
PopUp properties in help for more details. You can change the argument
to acWindowNormal to open the form normally, but that mode doesn't
force the user to fill out the form before they can continue. You'll
have to look at the pros and cons to decide which way to go.

Jana

  #5  
Old November 13th, 2005, 10:04 AM
tina.boroff@gmail.com
Guest
 
Posts: n/a
Default Re: Opens forms without scroll boxes

THanks so much Jana...I will give it a try.

  #6  
Old November 13th, 2005, 10:05 AM
Jana
Guest
 
Posts: n/a
Default Re: Opens forms without scroll boxes

No problem, good luck!

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.