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
4881 Views

Similar Articles

[PageSpeed] 51

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:

email created in publisher has jibberish
When I create an email in Publisher and send it to my smtp email address, I open it up to read the email and it has the following jibberish before the actual email: v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} b\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Is this something that can be prevented in the creation? Or is this something that happens after it is emailed? ...

Creating a frame window for MDI in a DLL
Have a question on creating an MDI 'application' from a DLL. I would like to launch an MDI 'psuedo' application from a DLL. That is, when this method is called from the main application, it would launch what would look like another application, that is an MDI frame with doc/view, etc.. I have seen something like this in .NET forms, however, I am using unmanged C++ code. I have some experimental code work done now and it appears that the call to LoadFrame fails (yes, I have included all of the necessary IDR_MAINFRAME resources). Is this possible? Has anyone done this? An...

Exchange 2007
Hi there, I'm trying to create a public contact folder in Exchange 2007. I can create a new public folder using the "New-PublicFolder" shell command, but it defaults to Post item types. Could anyone tell me how to set it so that it defaults to Contact item types? Thanks, -Richard rk <rk@leapbeyond.com> wrote: > Hi there, > > I'm trying to create a public contact folder in Exchange 2007. > > I can create a new public folder using the "New-PublicFolder" shell > command, but it defaults to Post item types. Could anyone tell me how > t...

Extracting Microsoft Dynamics CRM Demonstration VPC vhd
Dear all, Help please...I've struggled all day with this. I need a copy of the Microsoft Dynamics CRM 3.0 Virtual PC Demonstration, released May 2006. I have downloaded the 5 files, from the Microsoft downloads site, but I cannot extract. I get the following two error messages, when I run the self-extracting .exe: Packed data CRC failed in Microsoft Dynamics CRM Demonstration VPC (May 2006 Edition - Extended).vhd CRC failed in Microsoft Dynamics CRM Demonstration VPC (May 2006 Edition - Extended).vhd Any ideas? As far as I can see the downloads of the part01.exe and part02 to ...

A Dynamic Query Worksheet?
I have the unfortunate task of converting a SQL Server database into stand-alone Excel file that will store all the data, as well as act a a "front-end' for browsing the data. I'd like to have an opening page of many different hyperlinks whic would send the user to a second worksheet and also pass a variable. The second worksheet would list the results of a query that would us the variable as a parameter and would get its data from a huge table o a 3rd Spreadsheet. Is this idea possible? If so, I'd appreciate any ideas, tips, hints o how to get this done. Thanks -- Messa...

Create an SMTP connector that uses authentication to 'smart host'
Let me just say this right out of the box; there's a lot of things in 2003 that seem to really suck compared to 2000. I just spent hours trying to delete all messages in the outbound smtp queue because there is no longer an option to just click on the 'queue' folder and select 'delete all', you have to go domain by domain searching for files and deleting them individually etc. LAME. I finally figured out a way to make them all end up in the same location so that if someone sends another 3 meg email to a thousand people, I can get them all in one shot, but I can't use it...

FORM funtion 2003/2007 versions
in 2003 version there is the FORM funtion(under data heading) that speeds up the population of small data bases by creating an "input" sheet.I am trying to locate the same funtion in the 2007 version. Sergio It's not on the ribbon, you can only add it to the QAT (Quick Access Toolbar) This is the small row of icons by default are top left, by the Office Button. To add this, right click on the QAT and select 'Customize Quick Access Toolbar...' Select 'Command Not in the Ribbon' from the 'Choose commands from' dropdown In the listbox below select ...

VBA code
Hi, I have to put VBA code in the worksheet_calculate event. How can I do this? Step by step please. Because it is worksheet code, it is very easy to install and use: 1. right-click the tab name near the bottom of the window 2. select View Code - this brings up a VBE window 3. enter the macro and close the VBE window If you save the workbook, the macro will be saved with it. To remove the macro: 1. bring up the VBE windows as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm To learn ...

Query Tied to Form doesn't work
I have a button on a form that populates a text box on the same form with text. I have a query where a field's criteria is a reference to the text box on the form so the text in the text box becomes the criteria for the query. After I click the button to populate the text box on the form and then run the query, it comes up blank (should be records). If I click the button on the form and copy the text from the text box to the query (in stead of a reference to the text box on the form) the query works fine. Any ideas why the query won't work with the reference to the text box on...

Creating new worksheets in a workbook....with a twist
I am currently trying to create somthing, I dont even know if excel i capable of doing it however. Basically I have a main page (Sheet 1) with a list in Column A wit building sites. Currently it goes from A10-32. Now each of thes currently has another worksheet within the workbook attached to it, an the information in the according row is displayed in that workbook. Is there a way in excel to create somthing so that when I add a nam into cell A33 that it automatically creates a new Worksheet with title of what is written in that cell? Only the Column A would be abl to do this no other colu...

Locating record in form
Hi How can I locate a record on the current form by value of an indexed field? Thanks Regards Hi John Create a textBox and in the AfterUpdate event put this Private Sub TextBoxName_AfterUpdate() Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[ID_Field] = " & Str(Nz(Me![TextBoxName], 0)) If Not rs.EOF Then Me.Bookmark = rs.Bookmark End Sub Change TextBoxName to what it is Change ID_Field to what it is -- Wayne Manchester, England. "John" wrote: > Hi > > How can I locate a record on the current form by value of an indexed field? >...

How to use Like and Or in Form.Filter VB Statement
This Works: Forms![Master Search].Form.Filter = "[GTPO] = Forms![Master Search]! Text63" FilterOn = True This Doesn't: Forms![Master Search].Form.Filter = "[GTPO] = Forms![Master Search]! Text63" Or "[Project Name] Like '*" & Forms![Master Search]!Text64 & "*'" FilterOn = True what is the correct syntax How many times are you going to ask the same question? I've already answered you: did that not work for you? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) <himmelrich@gmail.com...

VBA and researching data thru 20.000 records
Hi, I have 2 sheets with several fields. on sheet1, i have new data and on sheet2 i have old data. i would like to update 2 fields of sheet1 with data from sheet2. for that i want to compare 3 fields, let's say C, D, E. if C, D, E are equal on sheet1 and sheet2, so i want to copy data from fields A and B (from sheet2) to fields A and B of sheet1. for now i use selection.autofilter ..... on the 3 fields to compare, but with my 20,000 records, it's really slow (on 3.1 Ghz CPU and 1 Ghz ram). So i would like to know if exists another way how to do it and for sure faster ? thanka ...

Office 2007 programs create unwanted borders
My organization runs Office 2007 on both Windows XP Pro clients and Windows 7 Enterprise. Recently we have been noticing a problem with inserted images in both Word 2007 and Excel 2007 where you insert an image into your document and save it, and the software puts a black border on the top and the left sides of the image. We can remove the border from most Word docs by saving the file in the previous version, which we don't want to do. We can also 'sometimes' remove the border by formatting the image and removing the countour color from the 3D properties. Removi...

E-mail Form
I switched web hosting and had to reconfigure my form to e-mail to me. The form will e-mail but, I need also to be able to take the person to a different page in my website. Right now when you click "proceed to next step", it takes you to a page that says your information has been sent. The "proceed to next step" is hyperlinked to go the correct page but, the hyperlink is not working. I think when I inserted yahoo's (host my web) html code for e-mailing me the form it has overwrited my hyperlink. Amy a Link to page will Help "Amy" <Am...

REPLY TO: how can i creat options in a cell of excel worksheet
You really need to give more information on what you're looking for. What do you mean by "Options"? Also, if you don't leave a message in the message portion when you're posting, many of us can't reply to the request. HTH, Barb Reinhardt ...

Problem Opening Forms Assistant By Default For Custom Objects
For standard CRM objects such as the Account, it's possible to open the forms assistant by default by setting relatedInformationCollapsed= “false” for the main form in the customization file. This same solution does not appear to work for custom objects and I am wondering if anyone else has encountered this problem and/or has a solution. Thanks, Darryl ...

how to use excel to creat an oncall schedule #2
i wantb to creat oncall schedule for doctors in a hospital. each 2 doctors would be on call for 12 hours a day. it can look like calendar and it should calculae how many days each one was oncall up to date. Let's say we have twelve worksheets in a workbook, one for each month. In each worksheet there would be one column for each doctor, doctor's name in the top row. Rows 2 thru 32 could correspond to the days of the month. Enter a 1 if the doctor was on-call that day. At the bottom of each worksheet in row 35 enter formula like: =SUM(A2:A32) and copy across. -- Gary''...

check substring of a string in Excel VBA
Hi, How do I check the subtring of a string ? I don't think I can use Strcomp. Let say I have string "Hello world" The Substring that I want to find is "orl" What function can I use? Regards, Magix Checkout the InStr() function in Help. -- Gary's Student "magix" wrote: > Hi, > > How do I check the subtring of a string ? I don't think I can use Strcomp. > > Let say I have string "Hello world" > > The Substring that I want to find is "orl" > > What function can I use? > > Regards, >...

Create Organization failed
I've moved my deployment to the production server and now want to create a new organization for testing purposes on the developmente server. When I run the New Organization wizard i get this error: Error| Create new Organization (Name=BigSky, Id=3a238cdc-773f-de11-81d3-000d9d4d28a8) failed with Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DirectoryServices.DirectoryServicesCOMException (0x80072037): There is a naming violation. (Exception from HRESULT: 0x80072037) I have had the same problem and sam...

Were can I find a design master I created?
I created a master slide design and it does not show up in the design template menu. Where could it be found? Julio Which version of PPT are you using? -- Echo [MS PPT MVP] http://www.echosvoice.com What's new in PPT 2007? http://www.echosvoice.com/2007.htm Fixing PowerPoint Annoyances http://tinyurl.com/36grcd PowerPoint 2007 Complete Makeover Kit http://tinyurl.com/32a7nx "Julio" <Julio@discussions.microsoft.com> wrote in message news:E246AB3D-9D8E-4C3B-A513-3E12EC97571E@microsoft.com... >I created a master slide design and it does not show up i...

Help Creating A Rule
I need help creating a particular rule. I get many SPAM emails that contain no text at all. Instead it is a graphic type that displays text. It looks like "Plain Text" but it is really a photo embedded into an email. How can I write a rule that will prevent this type of SPAM. You can't search the body for text. It is worthless trying to write something that can spot the issue in the header because it can vary so much. Any way to write a rule that can detect the absent of all text? Don't use rules - set your Outlook Junk Filter to highest. --� Milly Staples [MVP - Ou...

Conditional Text in textbox control of continuous form
Hello, I read a lot of things about conditional formating (color, font...) but how can I make a condition like: if text="ST" then text="PC" So I just want to show other text in the specific textboxes in the continuous form in the case of condition. Is this possible? juvi Conditional formatting won't change the contents of the textbox. That's not formatting, that's data. You can do this with vba however. A practical application would be if the user chooses a particular product in a form and you want to put the price that is normally charged for this product...

Can a form linked to an autoLookup query update another table
I created a form that is updated with an AutoLookup query from another table once a certain linked field is filled in. Can this form be used to add a record to the source table with the updated information? When that record is saved, the record is added to the form's source table - assuming the form is bound to the source table. How does your form save the record? Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "oterosuz" <oterosuz@discussions.microsoft.com> wrote in message news:3608D905-8769-435E-B5E5-7B0F566AFD63@microsoft.com......

A form problem
On my main form, Home Base, is a subform that shows me a list of persons. I have a set of command buttons that make different report for the selected person. That works fine. What I need to do is a command button that modifies the list, Ex : 30 days, 60 days 90 days. I click the 30 days button and the list will be composed of the people that I saw in the last 30 days. I can make a query and all for that but I can't manage to simply update (or requery) the list with the selected filter (or query) without changing the hole screen. How can I update the present subform wit...