Translation of FORM functions into web-based function

308 views
Skip to first unread message

Don

unread,
Mar 13, 2004, 3:38:17 PM3/13/04
to
Hi,

I'm not a stranger to Access but I don't use FORMs for
applications.
Now, I'm tasked to develop a web app based on a complex
FORM -based
app, the current FORM -based app works but has problems (
one indicator: the recordset type
= Dynaset (Inconsistent Updates) ).

The design view points me to record source (query) behind
the form (it's a SELECT query in this case I find),
however, the FORM in question embeds lots of business
rules, lots of functions and/or subforms, what's a good
way to get to all these functions/subforms,
their interaction, and equally important, how
the FORM is going to be processed (maybe, I'm talking in
Web terms :), but bear with me, the question is, how are
we going to capture the FORM data? What gives me the
clue? How could I find the VB code for
that?

TIA.

Michel Walsh

unread,
Mar 15, 2004, 7:33:21 AM3/15/04
to
Hi,


The data is captured through the relation between a control (on the
form) and the field (in the table) through the control property
ControlSource.

Me.ControlName.ControlSource="fieldName"

When a dirty record is to be saved (going to another record, closing the
form), the data will be exchange from the form to the table. When a new
record is about to be display, the exchange is reversed, from the table to
the control. You have no code to produce for a form bound to a table (or
query) through the form property RecordSource. That is done automatically
for you, in that case. That would not be the case for an unbound form.

Hoping it may help,
Vanderghast, Access MVP


"Don" <anon...@discussions.microsoft.com> wrote in message
news:996501c4093b$1d2d6050$a601...@phx.gbl...

anon...@discussions.microsoft.com

unread,
Mar 15, 2004, 3:46:26 PM3/15/04
to
Michel,

Thank you for your follow-up, it's good to know. Here's
a further question along the line, I'm posting a Design
View of the FORM in question, what I intend to do is to
figure out all the subfunctions contained in subforms etc
from this View or other means via the FORM, any further
guidance would be much appreciated, the URL for the
screen capture of the FORM is,
http://68.32.63.205/AccessFORM/Form1.GIF

TIA

Don

>.
>

Michel Walsh

unread,
Mar 16, 2004, 7:01:58 AM3/16/04
to
Hi,


You can try Application.LoadFromText, undocumented and unsupported (so,
at your own risk if it broke in the next version) and parse the text of the
definition, or try to use the vbe object (Access 2000 and later). If you own
VB6, you can try something like (need a reference to TLBINF32.dll) the
following to get all the exposed method of an object (here, Form_From1):

===========================
Option Compare Database
Option Explicit

Function GetClassInfo() As String

Dim TLIapp As New TLI.TLIApplication
Dim ParamInfo As TLI.ParameterInfo
Dim Members As TLI.Members
Dim MemberInfo As TLI.MemberInfo

Dim s As String
Dim temp As String
Dim xx As Object
Dim xxxx As Form_Form1

Set xxxx = New Form_Form1
Set xx = TLIapp.InterfaceInfoFromObject(xxxx)
Set Members = TLIapp.InterfaceInfoFromObject(xxxx).Members '
Application.DoCmd).Members
For Each MemberInfo In Members
With MemberInfo
s = vbNullString
For Each ParamInfo In .Parameters
s = s & ParamInfo.Name & ", "
Next
If Right(s, 1) = "," Then s = Left(s, Len(s) - 1)
s = "(" & s & ")"
temp = temp & .MemberId & " " & .Name & s & vbCrLf
End With
Next MemberInfo

GetClassInfo = temp
End Function
=============================

Use:


? GetClassInfo()

You still have to identify the form used as subform (rather than using
Form1).


Hoping it may help,
Vanderghast, Access MVP

<anon...@discussions.microsoft.com> wrote in message
news:d74601c40ace$95f26cd0$a301...@phx.gbl...

anon...@discussions.microsoft.com

unread,
Mar 17, 2004, 11:59:53 AM3/17/04
to
Hi Michel,

Thank you very much for the follow-up. A couple of
things here.
A) the current FORM -based app is on Access 97,
conversion to Access 2000 failed and we don't bother to
see what's going on there).
B) Probably I don't have any VB software on my box (XP
Professional), I guess the box may have some sort of VB
support but don't if it's complete or sort of like that.
C) Does your following VB program essentially provide the
function of adding a new member to the field of [Name]
and assuming [MemberId] is autonumber, the underlying
table name is "Members"? Sorry I've never written a
single line in VB.

Best regards,

Don

>.
>

Michel Walsh

unread,
Mar 18, 2004, 6:35:31 AM3/18/04
to
Hi,


I don't think there would be a problem with Access 97, but I can't
try it. The easiest way to put your hand on TLBINF32.dll is through Visual
Studio; I am not aware if it can be redistribute freely otherwise... maybe
you can check if it is available as download from MSDN (but I seriously
doubt it is). The program is based on the fact that a com-base element
"announces" its "methods" in a standard way. The program just retrieve those
announces. As example, for Access 2003,
===========================
Function GetClassInfo() As String

Dim TLIapp As New TLI.TLIApplication
Dim ParamInfo As TLI.ParameterInfo
Dim Members As TLI.Members
Dim MemberInfo As TLI.MemberInfo

Dim s As String
Dim temp As String
Dim xx As Object
Dim xxxx As Form_Form1

Set xxxx = New Form_Form1
Set xx = TLIapp.InterfaceInfoFromObject(xxxx)

Set Members = TLIapp.InterfaceInfoFromObject(Application.DoCmd).Members


For Each MemberInfo In Members
With MemberInfo
s = vbNullString
For Each ParamInfo In .Parameters
s = s & ParamInfo.Name & ", "
Next

If Right(s, 2) = ", " Then s = Left(s, Len(s) - 2)


s = "(" & s & ")"
temp = temp & .MemberId & " " & .Name & s & vbCrLf
End With
Next MemberInfo

GetClassInfo = temp
End Function
=====================

prints, (partial listing)


=====================
1025 RepaintObject(ObjectType, ObjectName)
1026 Rename(NewName, ObjectType, OldName)
1027 Restore()
1030 RunMacro(MacroName, RepeatCount, RepeatExpression)
1031 RunSQL(SQLStatement, UseTransaction)
1032 SelectObject(ObjectType, ObjectName, InDatabaseWindow)
1035 SetWarnings(WarningsOn)
1036 ShowAllRecords()
1039 OpenReportOld0(ReportName, View, FilterName, WhereCondition)
=====================

and, as you see, the sequence of numbers is not necessary continuous.
Basically, it will be the list of Application.Method(arguments)


Hoping it may help,
Vanderghast, Access MVP

<anon...@discussions.microsoft.com> wrote in message
news:f2e701c40c41$4463b850$a101...@phx.gbl...

anon...@discussions.microsoft.com

unread,
Mar 18, 2004, 12:02:38 PM3/18/04
to
Hi Michel,

Thanks. I've just searched MSDN site for TLBINF32.dll to
no avail. So, first I need to buy a copy of Visual
Studio 6.0, correct? or ...?

Don

>.
>

Michel Walsh

unread,
Mar 18, 2004, 2:36:56 PM3/18/04
to
Hi,

In another message, Alick Ye [MSFT] mentioned ion this forum ( 2003-08-28
23:57:28 PST ) :


We can download the help file for the redistributable TypeLib Information
object library (TlbInf32.dll) from the website:
http://msdn.microsoft.com/vbasic/downloads/addins/componets/default.aspx


Hoping it may help,
Vanderghast, Access MVP

<anon...@discussions.microsoft.com> wrote in message
news:f95201c40d0a$d16e7e50$a401...@phx.gbl...

anon...@discussions.microsoft.com

unread,
Mar 19, 2004, 11:04:31 AM3/19/04
to
Thanks, Michel, it requires VB6, ran net search for it,
it seems it has been discontinued, instead Visual
Studio .NET. Another other options?

Best regards,

Don

>-----Original Message-----
>Hi,
>
>
>

>.
>

Michel Walsh

unread,
Mar 19, 2004, 12:06:43 PM3/19/04
to
Hi,


Well, I assumed Microsoft was still *supporting* VB6. :-)


Vanderghast, Access MVP


<anon...@discussions.microsoft.com> wrote in message
news:b99f01c40dcb$dd7bd960$a001...@phx.gbl...

anon...@discussions.microsoft.com

unread,
Mar 22, 2004, 7:55:10 PM3/22/04
to
Hi,

I took a "bold" step today, that is, after making a copy
of the db in question, I "dare" to click on anything,
the "Build Event" sometime seems to offer some clue, any
more?

Thanks.

Don

>.
>

anon...@discussions.microsoft.com

unread,
Mar 25, 2004, 8:07:24 PM3/25/04
to
Michel,

I owe you this update. OK, after some pain I believe
I've done it, reverse engineer the Access app to Web app,
now it's much easier to use and straight-forward, imho.

Thanks.

Don

>>> >> > If Right(s, 2) = ", " Then s = Left

>.
>

Reply all
Reply to author
Forward
0 new messages