SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old October 2nd, 2003, 01:45 PM
kk057 kk057 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 kk057 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
DAP ComboBox does not immediately refresh

Hi. This is a vbScript question

In my Data Access Page, I have a a combo box from which the user can select a specific record to view based on the value SupervisorManagerName. My combo box works fine in that respect. The user clicks on a name in the combo box, and the record is populated with the correct record.

When I add a *new* record, however, the combo box does not refresh immediately to include the new SupervisorManagerName in its list. Once I close the DAP and then reopen it, the new SupervisorManagerName is included in the combo box, and I can select the name to pull up the record.

Any suggestions on how to get the combo box to refresh immediately upon adding/saving a new record without having to actually close and then reopen the page?

I am able to make this process work using VBA and a regular Access page, but can't figure out how to do this using vbScript

If this helps, I'm including the VBA code that works in Access. I can't figure out how to convert this to vbScript and my Data Access Page. Thank you soooooooooo much for any suggestions. It's driving me crazy

VBA version

General Module:
Public Function IsOpen(ByVal FormName As String) As Boolean
'returns True if the specified form is open in Form view

Const DesignView = 0
Const ObjStateClosed = 0
IsOpen = False

If SysCmd(acSysCmdGetObjectState, acForm, FormName) <>_
ObjStateClosed Then

If Forms(FormName).CurrentView <> DesignView Then
IsOpen = True
End If
End If
End Function

Code from Form:
Private Sub Form_AfterUpdate()
'Refresh the form to immediately reflect additions, deletions or changes
'Using the Refresh & Requery methods and calling the IsOpen user-defined function found in the General module

If IsOpen("SupervisorManager") Then
Forms!SupervisorManager.Refresh
End If

If IsOpen("SupervisorManager") Then
'refresh form to show the value in the
'supervisormanager TEXT box
Forms!SupervisorManager.Requery
End If

End Sub

Any suggestions on how to make this work in vbScript for a Data Access Page?
Again, thank you very very much.

Reply With Quote
  #2  
Old October 3rd, 2003, 09:46 AM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,224 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 34 m 57 sec
Reputation Power: 174
Moved to the ASP forum from Scripts.

kk057,

The 'Scripts' forum is a language-agnostic forum where users can request advice as to already-coded scripts that they can download & use for a specific purpose.

Language specific questions should be posted to their appropriate forums.

I hope this alleviates any confusion you may have. Thanks.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever.
Analyze twice; hack once.
The world's first existential ITIL question: If a change is released into production without a ticket to track it,
was it actually released?


About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect -
Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > DAP ComboBox does not immediately refresh


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway