Create Form Dynamically in VBA

Without going into alot of details I need to create thru code and dynamically 
a FORM in Datasheet View with a recordsource is an exisiting query.  Can this 
be done in code on the fly.  I also need code that deletes or purges the same 
form object.

thanks for any help.
0
Utf
1/18/2008 7:58:00 PM
access.formscoding 7493 articles. 0 followers. Follow

7 Replies
4767 Views

Similar Articles

[PageSpeed] 28

Why?
It is not a good idea.
Perhaps if you described what you want to do, we can help with a how.
-- 
Dave Hargis, Microsoft Access MVP


"Bret" wrote:

> Without going into alot of details I need to create thru code and dynamically 
> a FORM in Datasheet View with a recordsource is an exisiting query.  Can this 
> be done in code on the fly.  I also need code that deletes or purges the same 
> form object.
> 
> thanks for any help.
0
Utf
1/18/2008 8:45:00 PM
I have a very involved form with multiple combo and list boxes. User selects 
or multi-selects their desired options.  From these I'm dynamically creating 
a SQL string in code and using "querydef" to delete and create a new QUERY 
object.

This query is the RECORDSOURCE of a listbox in the form that displays the 
results.  After query has new SQL string, I just repaint or requery the 
listbox and new results are displayed.  All works wonderfully.

Now my customer wants NOT A LISTBOX but a form or subform in Datasheet View 
OR a Report or SubReport.   
This is where the problem is.  The FORM object doesn't SEEM to be able to 
accept the new query (or new SQL string) from its original via code. 
For example if a the displayed report has column headings of January2007 to 
June2007 with calculated values and now the user Selects January2007 to 
December2007, the form doesn't accept the new query as its RECORDSOURCE, the 
report is filled with the error figures, it wants to be built from scratch.

Thus my request to build a form in code if possible, unless you have another 
welcome option or no how to do this thru code.

thanks for your reply.



"Klatuu" wrote:

> Why?
> It is not a good idea.
> Perhaps if you described what you want to do, we can help with a how.
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "Bret" wrote:
> 
> > Without going into alot of details I need to create thru code and dynamically 
> > a FORM in Datasheet View with a recordsource is an exisiting query.  Can this 
> > be done in code on the fly.  I also need code that deletes or purges the same 
> > form object.
> > 
> > thanks for any help.
0
Utf
1/18/2008 9:17:11 PM
do you mean it is not accepting the SQL as the record source of the report or 
the form object?  Is the form object  the main form or the subform?
I know it is possible to change the recordsource of a form in runtime, but I 
think a report has to be in design view to change the record source.

If it is the report, try opening the report in design view, hidden, and 
change the record source. the close it with asSave Yes, then run it again.
-- 
Dave Hargis, Microsoft Access MVP


"Bret" wrote:

> I have a very involved form with multiple combo and list boxes. User selects 
> or multi-selects their desired options.  From these I'm dynamically creating 
> a SQL string in code and using "querydef" to delete and create a new QUERY 
> object.
> 
> This query is the RECORDSOURCE of a listbox in the form that displays the 
> results.  After query has new SQL string, I just repaint or requery the 
> listbox and new results are displayed.  All works wonderfully.
> 
> Now my customer wants NOT A LISTBOX but a form or subform in Datasheet View 
> OR a Report or SubReport.   
> This is where the problem is.  The FORM object doesn't SEEM to be able to 
> accept the new query (or new SQL string) from its original via code. 
> For example if a the displayed report has column headings of January2007 to 
> June2007 with calculated values and now the user Selects January2007 to 
> December2007, the form doesn't accept the new query as its RECORDSOURCE, the 
> report is filled with the error figures, it wants to be built from scratch.
> 
> Thus my request to build a form in code if possible, unless you have another 
> welcome option or no how to do this thru code.
> 
> thanks for your reply.
> 
> 
> 
> "Klatuu" wrote:
> 
> > Why?
> > It is not a good idea.
> > Perhaps if you described what you want to do, we can help with a how.
> > -- 
> > Dave Hargis, Microsoft Access MVP
> > 
> > 
> > "Bret" wrote:
> > 
> > > Without going into alot of details I need to create thru code and dynamically 
> > > a FORM in Datasheet View with a recordsource is an exisiting query.  Can this 
> > > be done in code on the fly.  I also need code that deletes or purges the same 
> > > form object.
> > > 
> > > thanks for any help.
0
Utf
1/18/2008 9:25:02 PM
Yes the form is the subform.
How would I do your suggestion in code?
Do I use   "DOCMD.OPENFORM(acDesign )  or DOCMD.OPENREPORT(acDesign,,,)?

thx

"Klatuu" wrote:

> do you mean it is not accepting the SQL as the record source of the report or 
> the form object?  Is the form object  the main form or the subform?
> I know it is possible to change the recordsource of a form in runtime, but I 
> think a report has to be in design view to change the record source.
> 
> If it is the report, try opening the report in design view, hidden, and 
> change the record source. the close it with asSave Yes, then run it again.
> -- 
> Dave Hargis, Microsoft Access MVP
> 
> 
> "Bret" wrote:
> 
> > I have a very involved form with multiple combo and list boxes. User selects 
> > or multi-selects their desired options.  From these I'm dynamically creating 
> > a SQL string in code and using "querydef" to delete and create a new QUERY 
> > object.
> > 
> > This query is the RECORDSOURCE of a listbox in the form that displays the 
> > results.  After query has new SQL string, I just repaint or requery the 
> > listbox and new results are displayed.  All works wonderfully.
> > 
> > Now my customer wants NOT A LISTBOX but a form or subform in Datasheet View 
> > OR a Report or SubReport.   
> > This is where the problem is.  The FORM object doesn't SEEM to be able to 
> > accept the new query (or new SQL string) from its original via code. 
> > For example if a the displayed report has column headings of January2007 to 
> > June2007 with calculated values and now the user Selects January2007 to 
> > December2007, the form doesn't accept the new query as its RECORDSOURCE, the 
> > report is filled with the error figures, it wants to be built from scratch.
> > 
> > Thus my request to build a form in code if possible, unless you have another 
> > welcome option or no how to do this thru code.
> > 
> > thanks for your reply.
> > 
> > 
> > 
> > "Klatuu" wrote:
> > 
> > > Why?
> > > It is not a good idea.
> > > Perhaps if you described what you want to do, we can help with a how.
> > > -- 
> > > Dave Hargis, Microsoft Access MVP
> > > 
> > > 
> > > "Bret" wrote:
> > > 
> > > > Without going into alot of details I need to create thru code and dynamically 
> > > > a FORM in Datasheet View with a recordsource is an exisiting query.  Can this 
> > > > be done in code on the fly.  I also need code that deletes or purges the same 
> > > > form object.
> > > > 
> > > > thanks for any help.
0
Utf
1/18/2008 9:31:00 PM
If you try to open a subform with the OpenForm method, it will open on it's 
own, not in the main form's subform control.

If you are opening the form stand alone, not a subform, you can do one of 
two things.  You can create a stored query that would be the record source of 
the form, modify it during runtime, then open the form.  If the form is 
alread open, you just set it's record source in code.

To use the querydef method:

Dim qdf As QueryDef
Dim strSQL As String

    Set qdf = Currentdb.QueryDefs("MyQueryName")
    strSQL = "Select Some fields from sometable where a field = something;"
    qdf.SQL = strSQL
    qdf.Close
    Set qdf = Nothing
    Docmd.OpenForm "AnyOleForm"

To change the recorord source of a open subform:

    Me.MySubformControlName.Form.RecordSource = strSQL

Note that MySubformControlName is the name of the subform control on the 
main form, not the name of the form being used as a subform.
-- 
Dave Hargis, Microsoft Access MVP


"Bret" wrote:

> Yes the form is the subform.
> How would I do your suggestion in code?
> Do I use   "DOCMD.OPENFORM(acDesign )  or DOCMD.OPENREPORT(acDesign,,,)?
> 
> thx
> 
> "Klatuu" wrote:
> 
> > do you mean it is not accepting the SQL as the record source of the report or 
> > the form object?  Is the form object  the main form or the subform?
> > I know it is possible to change the recordsource of a form in runtime, but I 
> > think a report has to be in design view to change the record source.
> > 
> > If it is the report, try opening the report in design view, hidden, and 
> > change the record source. the close it with asSave Yes, then run it again.
> > -- 
> > Dave Hargis, Microsoft Access MVP
> > 
> > 
> > "Bret" wrote:
> > 
> > > I have a very involved form with multiple combo and list boxes. User selects 
> > > or multi-selects their desired options.  From these I'm dynamically creating 
> > > a SQL string in code and using "querydef" to delete and create a new QUERY 
> > > object.
> > > 
> > > This query is the RECORDSOURCE of a listbox in the form that displays the 
> > > results.  After query has new SQL string, I just repaint or requery the 
> > > listbox and new results are displayed.  All works wonderfully.
> > > 
> > > Now my customer wants NOT A LISTBOX but a form or subform in Datasheet View 
> > > OR a Report or SubReport.   
> > > This is where the problem is.  The FORM object doesn't SEEM to be able to 
> > > accept the new query (or new SQL string) from its original via code. 
> > > For example if a the displayed report has column headings of January2007 to 
> > > June2007 with calculated values and now the user Selects January2007 to 
> > > December2007, the form doesn't accept the new query as its RECORDSOURCE, the 
> > > report is filled with the error figures, it wants to be built from scratch.
> > > 
> > > Thus my request to build a form in code if possible, unless you have another 
> > > welcome option or no how to do this thru code.
> > > 
> > > thanks for your reply.
> > > 
> > > 
> > > 
> > > "Klatuu" wrote:
> > > 
> > > > Why?
> > > > It is not a good idea.
> > > > Perhaps if you described what you want to do, we can help with a how.
> > > > -- 
> > > > Dave Hargis, Microsoft Access MVP
> > > > 
> > > > 
> > > > "Bret" wrote:
> > > > 
> > > > > Without going into alot of details I need to create thru code and dynamically 
> > > > > a FORM in Datasheet View with a recordsource is an exisiting query.  Can this 
> > > > > be done in code on the fly.  I also need code that deletes or purges the same 
> > > > > form object.
> > > > > 
> > > > > thanks for any help.
0
Utf
1/18/2008 9:44:00 PM
Here is some code I use to create quick and dirty generic data maintenance 
forms in a batch for a set of tables at one time (those tables specified by 
their entry in table sysTableXref). More than you asked for or probably 
want. Please note that I use this while the app is in development, never in 
live production. So, this addresses the "how do I" portion of your post. 
Whether you *should* is a separate issue. There may be some obvious 
references here to other functions, but they should be self explanatory. 
I've actually edited some stuff out, but left a lot of it as-is, just as an 
example of "how to do" a bunch of related stuff you didn't specifically ask 
about.

These forms are intended to be presentable in either Datasheet or Single 
form view, so more care is taken in spacing and formatting the controls and 
labels than you would need if you are confining it to Datasheet view only.


Private Sub CreateFormsInBatch()
    On Error GoTo ErrHandler
    ' Build new generic forms in a batch.(Quick & Dirty)

    Dim frm As Form
    Dim db As DAO.Database
    Dim tdf As DAO.TableDef
    Dim strName As String
    Dim fld As DAO.Field
    Dim intControlType As Integer
    Dim ctlLabel As Control
    Dim ctlData As Control
    Dim intDataXleft As Integer
    Dim intDataYtop As Integer
    Dim intDataXwidth As Integer
    Dim i As Integer


    Set db = CurrentDb
    For Each tdf In db.TableDefs
        ' Continue only if flag is set
        If Nz(DLookup("[RebuildForm?]", "sysTableXref", "[TableName] = '" & 
tdf.Name & "'"), "False") Eqv True Then
            ' Create new form.
            Set frm = CreateForm
            i = i + 1
            ' Set form properties.
            With frm
                .RecordSource = tdf.Name
                ' Set default view to datasheet view
                .DefaultView = 2
                .DividingLines = False
                .RecordSelectors = False
                .AllowDesignChanges = False
                ' Set name for new form
                strName = "frm" & Mid$(tdf.Name, 4, 20)
                .Caption = strName

                .AllowPivotChartView = False
                .AllowPivotTableView = False
                .AutoCenter = True
                .AutoResize = True
                .ShortcutMenu = True
                .ShortcutMenuBar = "CustomShortcut"

                intDataXleft = 2000
                intDataYtop = 100
                For Each fld In tdf.Fields
                    ' Set positioning values for new controls.
                    On Error Resume Next
                    intControlType = fld.Properties("DisplayControl")
                    If Err.Number <> 0 Then
                        ' An error was raised because the property doesn't 
exist for this field.
                        ' therefore, the field is still the default: a text 
box.
                        intControlType = acTextBox
                    End If
                    On Error GoTo ErrHandler
                    Select Case intControlType
                        Case acTextBox
                            If fld.Type = dbText Then
                                ' Contains a text field: allocate roughly 75 
twips per character. 1440 = 1 inch
                                If fld.Size > 20 Then
                                    intDataXwidth = (1.5 * 1440) ' 1.5 
inches
                                Else
                                    intDataXwidth = (fld.Size * 75)
                                    If intDataXwidth < 800 Then 
intDataXwidth = 800
                                End If
                            Else
                                intDataXwidth = (1.5 * 1440) ' 1.5 inches
                            End If
                        Case Else
                            ' Not a text box
                            intDataXwidth = (1.5 * 1440)   ' 1.5 inches
                    End Select

                    ' Create bound control of designated type in detail 
section.
                     Set ctlData = CreateControl(frm.Name, intControlType, , 
"", fld.Name, _
                                intDataXleft, intDataYtop, intDataXwidth)
                    ctlData.TextAlign = 1  ' Left align
                    ctlData.Name = "ctl" & fld.Name

                    ' Create child label control for text box.
                    Set ctlLabel = CreateControl(frm.Name, acLabel, , _
                         ctlData.Name, fld.Name, 50, intDataYtop, 1850)
                    ctlLabel.Width = 1850
                    ctlLabel.TextAlign = 3  'Right align
                    ctlLabel.Name = "lbl" & fld.Name

                    Select Case fld.Name
                        Case "AddedBy"
                             .BeforeUpdate = 
"=AddTimestampToRecord([ctlAddedBy])"
                        Case Else
                            ' Do nothing
                    End Select

                    Select Case Left$(fld.Name, 5)
                        ' Format AddedBy/On and ChangedBy/On controls
                        Case "Added", "Chang"
                            ctlData.Enabled = False
                            ctlData.Locked = True
                            ctlData.SpecialEffect = 0    'Flat
                            ctlData.BorderStyle = 0    'None
                            ctlData.BackColor = glngGrayBackColor
                        Case Else
                    End Select
                    If (fld.Attributes And dbAutoIncrField) Then
                        ' field is an autonumber field
                        ctlData.Enabled = False
                        ctlData.Locked = True
                        ctlData.BackColor = glngGrayBackColor
                    End If
                   intDataYtop = intDataYtop + 300
                Next fld
            End With

            DoCmd.Save , strName
            DoCmd.Close acForm, strName, acSaveYes
            DoEvents
        End If
    Next

    MsgBox "Complete: " & i & " forms created."
ExitHere:
    Set fld = Nothing
    Set tdf = Nothing
    Set db = Nothing
    Exit Sub
ErrHandler:
    Select Case Err.Number
        Case 2501   'Ignore: Save function canceled by user
            DoCmd.Close , , acSaveNo
            Resume Next
        Case 438   'Ignore: Object doesn't support this property/method.
            ' Possible cause: trying to apply TextAlign to a checkBox, etc.
            Resume Next
        Case Else
            Call ErrorLog(mModuleName & ".CreateFormsInBatch")
            Resume ExitHere
    End Select
End Sub
-- 
HTH,
George


"Bret" <Bret@discussions.microsoft.com> wrote in message 
news:1F411B89-6456-462C-8AE8-FEB3DC7A8D44@microsoft.com...
> Without going into alot of details I need to create thru code and 
> dynamically
> a FORM in Datasheet View with a recordsource is an exisiting query.  Can 
> this
> be done in code on the fly.  I also need code that deletes or purges the 
> same
> form object.
>
> thanks for any help. 


1
George
1/18/2008 10:10:53 PM
=?Utf-8?B?QnJldA==?= <Bret@discussions.microsoft.com> wrote in
news:05F9FF53-BDB6-4FE1-BE76-A70212587DF4@microsoft.com: 

> I have a very involved form with multiple combo and list boxes.
> User selects or multi-selects their desired options.  From these
> I'm dynamically creating a SQL string in code and using "querydef"
> to delete and create a new QUERY object.
> 
> This query is the RECORDSOURCE of a listbox in the form that
> displays the results.  After query has new SQL string, I just
> repaint or requery the listbox and new results are displayed.  All
> works wonderfully. 
> 
> Now my customer wants NOT A LISTBOX but a form or subform in
> Datasheet View OR a Report or SubReport.   
> This is where the problem is.  The FORM object doesn't SEEM to be
> able to accept the new query (or new SQL string) from its original
> via code. For example if a the displayed report has column
> headings of January2007 to June2007 with calculated values and now
> the user Selects January2007 to December2007, the form doesn't
> accept the new query as its RECORDSOURCE, the report is filled
> with the error figures, it wants to be built from scratch. 
> 
> Thus my request to build a form in code if possible, unless you
> have another welcome option or no how to do this thru code.
> 
> thanks for your reply.
> 
> 
What I think to be happening is that you change the field names 
presented in the query
If you alias the fields to some constant names the form will work.

SELECT January07 as month1, February07 as Month2, ....

The problem is how to update the form's labels: the answer is to 
include a field in the query that returns a starting date, which can 
be used to calculate the required caption for each label, then set 
the lblMonth3 caption = format(dateadd("m",2,startdate),"mmmmyy") 


> 
> "Klatuu" wrote:
> 
>> Why?
>> It is not a good idea.
>> Perhaps if you described what you want to do, we can help with a
>> how. -- 
>> Dave Hargis, Microsoft Access MVP
>> 
>> 
>> "Bret" wrote:
>> 
>> > Without going into alot of details I need to create thru code
>> > and dynamically a FORM in Datasheet View with a recordsource is
>> > an exisiting query.  Can this be done in code on the fly.  I
>> > also need code that deletes or purges the same form object.
>> > 
>> > thanks for any help.



-- 
Bob Quintal

PA is y I've altered my email address.

-- 
Posted via a free Usenet account from http://www.teranews.com

0
Bob
1/18/2008 11:34:31 PM
Reply:

Similar Artilces:

VBA code to pause before printing
I have a workbook containing several sheets. In one of them there's a list of organizational units. I've written a macro that grabs selected unit identifiers from the sheet "F Units", copies them one by one to a cell called Filter, and prints sheets with diagrams and statistics for each of the units. The procedure sometimes partly fails, as the filter isn't applied to the statistics sheet. I guess this happens because the sheets are printed before Excel finishes recalculating. If this is true, I believe I can prevent the error by adding a "Wait" command,...

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

Reports and Forms Customizations After Migration to GP8
Hi i have migrated my Test Server to GP 8 and i Exported the Modified Reports and Forms and imported them again to the Test Server, the screen Labels are updated to the new lables but the fields formats didnt update for example the phone field format returned to the original. how can i solve this issue? regards Nader Formats are not transferred using packages. You will either need to keep your original forms and reports dictionaries and upgrade them, or remake the format changes. I would suggest recording the format changes using a macro, so they can easily be re-run if required. ...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

VBA Question
Hi, I have a form with a combobox control that list some sizes. They are: 12 18 20 22 I have another text box for keying a custom size, such as 12'2". What I would like to do is have the combobox default to the next size (in this case 18). Here's the code I have used so far (it does a little more than what I am asking for but to give an idea): Dim MCUST As String MCUST = Me.custwidth If Str(Me.widthck) <> Me.custwidth Or Len(Me.custwidth) <> Len(Me.widthck) Then Me.widthck.Value = Int(Val(MCUST)) + 1 If InStr(Int(Me.widthck) / 2, ".&...

Task Create - Status
I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

Problem opening Forms
I have several Forms that do not open properly... When I open Access, click on the Forms object, and then choose a particular Form, it opens to a blank screen. On the blank screen, I can see the Form when I select design view, however, when I choose Form view, nothing's there. I've done some playing around and have figured out a way to get the Form to display (in Form view). I go to design view and change 'Data Entry' to 'No'. What's also strange is that my switchboard will open the Form (in Form view) every time. It's only when I open the Form without the...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Controlling display of forms
Hi, I'm trying to control what parts of a form are visible or not depending on the user of the computer. I've managed to find and adapt some code to tell me who the user is and I have a table set up with user names and a permission level (1 or 0) I can manually alter the On_Load event of my form to hide the parts I want (tabs) Can anybody help me out with putting it all together so that the forms On_Load event looks at GetUserName function which looks at the UserPermissions table and sets Visible True or False accordingly. This is taking me so long and it looks like it ought ...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

Modifier w/VBA or ???
Can I use Modifier w/VBA code to deploy a custom Excel report? I need to: 1. Create a form that accepts a date from a user 2. Run a query or call a stored procedure using the date as a filter/parameter to return data 3. Using VBA create. fill, and format an Excel spreadsheet with the returned data and making the Excel visible to the user. I've reviewed the docs for modifying existing forms and I have the VBA code for formatting ready but I'm not sure how to create the input form (can I just modify any existing form?) or setup the deployment to the user. I've loaded and t...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

Continuous form record number
I have a form whose default view is 'continuous form'. Then when I click a button I need to delete the record where the mouse is (was just) placed. How can I find out the record number? Alternatively any idea is welcome. Thanks Henry "H. Martins" <hjrmartins@gmail.com> wrote in message news:b4ab14e1-51c6-4c16-8a78-bc7df76670de@k31g2000vbu.googlegroups.com... >I have a form whose default view is 'continuous form'. > > Then when I click a button I need to delete the record where the mouse > is (was just) placed. > > Ho...

fill html form with CHtmlView
Suppose there is a web site http://www.somesite.com asking me to fill a lot information to proceed. I am writing a SDI program with CHtmlView to automate the process. The program is just like a simple web browser. Suppose here is the html of http://www.somesite.com <html> <body> .... <form> <input type="text" name="info"> </form> .... </body> </html> I set my CHtmlView with Navigate2(_T("http://www.somesite.com")); and I want to put my information automatically in the form. How can I do it in CHtmlView? Thanks, John...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

How to create Access macro shortcut
I'm still using Access 97 and saw something the other day that I would like to use that was in Access 2000. In an Access 2000 database, there was a .mam file in a directory that launched the Access 2000 program and ran a macro. How do you set this up? Can it be done in Access 97? If so, how? Hi. > How do you set this up? Select the macro in the Database Window and right click with your mouse, then select "Create Shortcut..." in the pop-up menu. Follow the prompts for where to place the shortcut and what to name it. The default is: <PathToDeskTopDir>\Shortcut ...

Users mailboxes not created when user created
I have a problem that recently just started happening on my exchange 2003 server. When i create a new user account and create the mailbox for exchange, once im done, the mailbox isnt created, adn if you go into the properties of the user account adn go to the exchange email address tab, there isnt an smtp or an x.400 address listed. I am having to manually create and add these, adn then go delete the exchange mailbox and recreate it. This is really annoying and would love to know if anyone has any ideas of how to fix it. Thanks Jason In news:9F836A43-98BF-435A-AA43-AFF10124BE3F@micro...

CRM should let me create custom fields in batch
Hi, With MS CRM v3.0, when we have a group of fields to create, it would be faster to be able to enter the list and then submit the list for processing. Thank you. Felix. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/C...

Creating an ad book
How do I divide a page into equal sections (halves, qarters, eights)? I need to scan and type ads and coupons into this booklet. New at this. After managing to set up OE-QuoteFix on his new PC, Ed reads a message from FRSH <anonymous@discussions.microsoft.com>... > How do I divide a page into equal sections (halves, qarters, eights)? Arrange > Layout Guides > Grid Guides -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm ...

Access unable to create an MDE
I am getting this message when I try to make an MDE: "Access unable to create an MDE database" No error mesages or any other info is displayed. I haven't had this trouble before. Then I added a form, a couple reports, an create table query, modified a toolbar and added a module. Now I am getting this message. This database is a front end of a project with several linked table to a back end. Any suggestions? Thanks Jeff G Try compiling your application (under the Debug menu when you're in the VB Editor). Often an application will have some error that doesn't m...

create a database from which bibliography an be created
How do I create a database from which a bibliography can be added to the end of a Word document? I used the program RefManager, but that is too expensive for me to update. Does Word 2003 have such a program? Thanks Not natively. Have you checked your academic institution? They might have campus licenses which students can use at home. You could give Zotero a spin (www.zotero.org). Personally, I don't like it, but that's just me. Word 2007 comes with referencing capabilities, but they are limited in functionality. Anything special you want, you would have to add i...