Re: Form updating

From: lisa (anonymous_at_discussions.microsoft.com)
Date: 09/24/04


Date: Thu, 23 Sep 2004 19:29:31 -0700

Hi Allen

I appreciate your help.

I have put the code in the correct place and made the
changes per your comments but when I select Compile I get
the message:

Compile error:
End if without block if>?????????

>-----Original Message-----
>Hi Lisa
>
>Just confirming that you have set the AfterUpdate
property of the Customers
>form to:
> [Event Procedure]
>and added the code there (not to the Order Form).
>
>Try Spaces instead of square brackets:
> Private Sub Form_AfterUpdate()
> If CurrentProject.AllForms("Order
form").IsLoaded Then
> Forms ("Order Form")!Combo62.Requery
> End If
> End Sub
>
>Then choose Compile from the Debug menu to make sure VBA
understands the
>code.
>
>If it still does not work, post back and we will explain
how to set a break
>point and step through your code.
>
>--
>Allen Browne - Microsoft MVP. Perth, Western Australia.
>Tips for Access users - http://allenbrowne.com/tips.html
>Reply to group, rather than allenbrowne at mvps dot org.
>
>"lisa" <anonymous@discussions.microsoft.com> wrote in
message
>news:1ece01c4a1d1$aef40140$a401280a@phx.gbl...
>>
>> I've tried the solution provided (thanks for that!) but
>> couldn't get it to work.
>>
>> My coding is below, please let me know where I'm going
>> wrong
>>
>> Private Sub Form_AfterUpdate()
>> If CurrentProject.AllForms([Order form]).IsLoaded Then
>> Forms ([Order Form]!Combo62.Requery
>> End If
>> End Sub
>>
>> Thanks
>>>-----Original Message-----
>>>Use the AfterUpdate event procedure of the Customer
form
>> to requery the
>>>customer combo on the Orders form
>>>
>>>Private Sub Form_AfterUpdate()
>>> If CurrentProject.AllForms("Orders").IsLoaded Then
>>> Forms("Orders")!CustomerID.Requery
>>> End If
>>>End Sub
>>>
>>>Notes:
>>>1 Replace "Orders" with the name of your form,
>> and "CustomerID" with the
>>>name of your combo.
>>>
>>>2. If you are using a version of Access older than
2000,
>> copy the IsLoaded()
>>>function from the Northwind sample database, and
replace
>> the first line
>>>with:
>>> If IsLoaded("Orders") Then
>>>
>>>3. You may want to do the same in the AfterDelConfirm
>> event of the Customer
>>>form.
>>>
>>>
>>>"lisa" <anonymous@discussions.microsoft.com> wrote in
>> message
>>>news:060b01c4a063$acceb190$a401280a@phx.gbl...
>>>> Hi
>>>>
>>>> I have created a customer sales database.
>>>> I have the following forms open: Customer information
>> and
>>>> Order form.
>>>>
>>>> A new customer calls and is added via the Customer
>>>> information form. I then move over to the Order
form -
>> in
>>>> the order form the customer name is selected from a
>> combo
>>>> box (which is from the record in the Customer
>> information
>>>> form)
>>>>
>>>> My problem is when a new customer is added I can't
see
>>>> them in the combo box list unless I close the
customer
>>>> form and then open the order form.... what can I do
so
>>>> the customer & order forms can always be open and the
>>>> data updates ??? Thanks
>
>
>.
>



Relevant Pages

  • Re: Word Programming - issue with Word versions and automation
    ... > Sub Test() ... > Dim iAppversion As Integer ... > Sub Save2K3Document(sDocName As String, ... Again, you cannot compile that code on a Word 2000 machine, but you can ...
    (microsoft.public.word.vba.general)
  • Re: What is the Fastest way for adding string items to some array/collection in sorted order?
    ... You should compile to native code. ... Dim subID&, subCount& ... For subID = 0 To UBound ... Public Sub Add ...
    (microsoft.public.vb.winapi)
  • Re: Access 2.0 report
    ... Sub Detail1_Format ... Is it possible that there two formatting issues butting heads within the ... report. ... Error" then the fourth is "Compile Error in 'On Format' Expression. ...
    (microsoft.public.access.reports)
  • Re: Global subroutines
    ... >> I know the Global.asax has script tags (only because that was the way the ... >> So if I compile it, would I end up with Global.dll? ... > Public Sub New ... > Public Class TestPage ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Weird bug in VS.NET 2003 IDE
    ... > From time to time, when I save my code, the IDE decides to add lines to ... > End Sub ... > End Namespace ... > the IDE adding all these lines is that the program fails to compile, ...
    (microsoft.public.vsnet.ide)