Using an Object from a Current form for Criteria in a Query

I am using Access 2000.

I have a Command Button on a form that is designed to preview or print that 
customer's invoice.

I use a Pop-Up Dialog Box. The end user will supply 2 pieces of data in this 
Dialog Box.  This data, together with the Customer ID from the current form. 
will provide the 3 necessary pieces of info to pass on to the query, and 
eventually the report, that creates the invoice.

I suspect that the "Me." or "Me!" "command" or "action" must be used, but am 
not clear about how to use it.

Perhaps someone can give me some examples of how to use that "command" or 
"action" with the proper syntax.  I've read the Help with no success.  It 
seems to be a important tool!
0
Utf
12/3/2009 7:02:01 PM
access.formscoding 7493 articles. 0 followers. Follow

7 Replies
713 Views

Similar Articles

[PageSpeed] 2

There is sample code to open a report from a dialog form here
http://www.allenbrowne.com//casu-08.htmlhttp://www.allenbrowne.com//casu-08.html

Look at Method 2 - form for entering dates.
Do a similar thing using the 3 pieces of info that the user will enter.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"nytwodees" <nytwodees@discussions.microsoft.com> wrote in message 
news:B718E092-DE20-4EAE-9655-8CFA97F9AD36@microsoft.com...
>I am using Access 2000.
>
> I have a Command Button on a form that is designed to preview or print 
> that
> customer's invoice.
>
> I use a Pop-Up Dialog Box. The end user will supply 2 pieces of data in 
> this
> Dialog Box.  This data, together with the Customer ID from the current 
> form.
> will provide the 3 necessary pieces of info to pass on to the query, and
> eventually the report, that creates the invoice.
>
> I suspect that the "Me." or "Me!" "command" or "action" must be used, but 
> am
> not clear about how to use it.
>
> Perhaps someone can give me some examples of how to use that "command" or
> "action" with the proper syntax.  I've read the Help with no success.  It
> seems to be a important tool! 


0
Jeanette
12/4/2009 7:18:20 AM
> I suspect that the "Me." or "Me!" "command" or "action" must be used, but am 
> not clear about how to use it.

This Me keyword is probably one of the greatest tools available to 
form/report programming, and you will be very happy to learn to use it.

I would suggest, where possible (which is pretty much everwhere) to use the 
Me. rather than the Me!   The bang operator (!) has a specific meaning that 
is generally easily confusable.  The dot operator will, unlike the bang 
operator, provide you with a list of available commands/actions that pertain 
to Me (this list is called intellisense, and is quite handy)

The keyword "Me" refers to the current form or report.  So lets say you have 
a simple form with a textbox (which is named txtThisBox) and a button (which 
is named btnThisButton), and the form itself is named frmThisForm.

When you open frmThisForm, and go to the events and create an event 
procedure, it brings you to the code module behind that form.  Because 
txtThisBox and btnThisButton are members of frmThisForm, you can reference 
them in this module.

If you type "Me.", as soon as you hit the "." you will see a list pop up of 
all the available methods, actions and controls pertaining to the form.  So 
lets pretend that you want to click on btnThisButton, and if there is an 
entry in txtThisBox, use that entry in an sql statement, and change the 
caption of the button to "SQL Ran" (I understand that this is not a likely 
situation, but serves the purpose of example).

Your event procedure for btnThisButton_Click may resemble something like 
so...  notice how the Me keyword is used to reference the controls that are 
on the form.




Private Sub btnThisButton_Click()

  Dim strSQL As String 'to hold your sql until we run it

  'if there's no value in txtThisBox exit the sub
  If Nz(Me.txtThisBox, "") = "" Then
    Exit Sub
  End If

  'if we made it this far there was a value, so we'll continue...
  'lets enter the value into an sql string

  strSQL = "DELETE * FROM tblThisTable WHERE " _
             &  "ThisField = '" & Me.txtThisBox & "'"

  'now we have an sql string that has the value of the text
  'box inserted as criteria

  CurrentDb.Execute strSQL

  'now set the caption of the button to "SQL Ran"

  Me.btnThisButton.Caption = "SQL Ran"

End Sub





Hopefully this sheds a little bit of light on the usage of the Me keyword.  
Basically, in a form or report, this allows you to quickly and easily 
reference all of the form/reports properties, actions, controls, methods, etc 
etc.

happy coding

-- 
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."  
-Thomas Edison (1847-1931) 



"nytwodees" wrote:

> I am using Access 2000.
> 
> I have a Command Button on a form that is designed to preview or print that 
> customer's invoice.
> 
> I use a Pop-Up Dialog Box. The end user will supply 2 pieces of data in this 
> Dialog Box.  This data, together with the Customer ID from the current form. 
> will provide the 3 necessary pieces of info to pass on to the query, and 
> eventually the report, that creates the invoice.
> 
> I suspect that the "Me." or "Me!" "command" or "action" must be used, but am 
> not clear about how to use it.
> 
> Perhaps someone can give me some examples of how to use that "command" or 
> "action" with the proper syntax.  I've read the Help with no success.  It 
> seems to be a important tool!
0
Utf
12/4/2009 2:11:01 PM
Thanks for your lengthy and informative response.  Unfortunately it did not 
get me any further.

Let me make myself clearer:

1. Suppose the field from my form that I want to capture and Pass on to my 
query id CustomerID.  What code should I use?

2. How do I then enter it in my query so that the criteria for the 
CustomerID field is = to the Me. ,,, expression, or whatever the necessary 
expression should be?


"Jack Leach" wrote:

> > I suspect that the "Me." or "Me!" "command" or "action" must be used, but am 
> > not clear about how to use it.
> 
> This Me keyword is probably one of the greatest tools available to 
> form/report programming, and you will be very happy to learn to use it.
> 
> I would suggest, where possible (which is pretty much everwhere) to use the 
> Me. rather than the Me!   The bang operator (!) has a specific meaning that 
> is generally easily confusable.  The dot operator will, unlike the bang 
> operator, provide you with a list of available commands/actions that pertain 
> to Me (this list is called intellisense, and is quite handy)
> 
> The keyword "Me" refers to the current form or report.  So lets say you have 
> a simple form with a textbox (which is named txtThisBox) and a button (which 
> is named btnThisButton), and the form itself is named frmThisForm.
> 
> When you open frmThisForm, and go to the events and create an event 
> procedure, it brings you to the code module behind that form.  Because 
> txtThisBox and btnThisButton are members of frmThisForm, you can reference 
> them in this module.
> 
> If you type "Me.", as soon as you hit the "." you will see a list pop up of 
> all the available methods, actions and controls pertaining to the form.  So 
> lets pretend that you want to click on btnThisButton, and if there is an 
> entry in txtThisBox, use that entry in an sql statement, and change the 
> caption of the button to "SQL Ran" (I understand that this is not a likely 
> situation, but serves the purpose of example).
> 
> Your event procedure for btnThisButton_Click may resemble something like 
> so...  notice how the Me keyword is used to reference the controls that are 
> on the form.
> 
> 
> 
> 
> Private Sub btnThisButton_Click()
> 
>   Dim strSQL As String 'to hold your sql until we run it
> 
>   'if there's no value in txtThisBox exit the sub
>   If Nz(Me.txtThisBox, "") = "" Then
>     Exit Sub
>   End If
> 
>   'if we made it this far there was a value, so we'll continue...
>   'lets enter the value into an sql string
> 
>   strSQL = "DELETE * FROM tblThisTable WHERE " _
>              &  "ThisField = '" & Me.txtThisBox & "'"
> 
>   'now we have an sql string that has the value of the text
>   'box inserted as criteria
> 
>   CurrentDb.Execute strSQL
> 
>   'now set the caption of the button to "SQL Ran"
> 
>   Me.btnThisButton.Caption = "SQL Ran"
> 
> End Sub
> 
> 
> 
> 
> 
> Hopefully this sheds a little bit of light on the usage of the Me keyword.  
> Basically, in a form or report, this allows you to quickly and easily 
> reference all of the form/reports properties, actions, controls, methods, etc 
> etc.
> 
> happy coding
> 
> -- 
> Jack Leach
> www.tristatemachine.com
> 
> "I haven't failed, I've found ten thousand ways that don't work."  
> -Thomas Edison (1847-1931) 
> 
> 
> 
> "nytwodees" wrote:
> 
> > I am using Access 2000.
> > 
> > I have a Command Button on a form that is designed to preview or print that 
> > customer's invoice.
> > 
> > I use a Pop-Up Dialog Box. The end user will supply 2 pieces of data in this 
> > Dialog Box.  This data, together with the Customer ID from the current form. 
> > will provide the 3 necessary pieces of info to pass on to the query, and 
> > eventually the report, that creates the invoice.
> > 
> > I suspect that the "Me." or "Me!" "command" or "action" must be used, but am 
> > not clear about how to use it.
> > 
> > Perhaps someone can give me some examples of how to use that "command" or 
> > "action" with the proper syntax.  I've read the Help with no success.  It 
> > seems to be a important tool!
0
Utf
12/7/2009 8:10:01 PM
You can use this type of thing in the criteria row of a query.
Forms![NameOfForm]![NameOfControl]

Access can read the value of customer id from the open form and put in the 
query.

You would want to do this if you are running the query while the form is 
open,
and if the query is not the record source of the form.

We are still trying to completely understand your question, so hope we are 
getting closer to your scenario and an answer that will work for you.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"nytwodees" <nytwodees@discussions.microsoft.com> wrote in message 
news:79AA0D15-A131-416E-97BF-F229E0D45508@microsoft.com...
> Thanks for your lengthy and informative response.  Unfortunately it did 
> not
> get me any further.
>
> Let me make myself clearer:
>
> 1. Suppose the field from my form that I want to capture and Pass on to my
> query id CustomerID.  What code should I use?
>
> 2. How do I then enter it in my query so that the criteria for the
> CustomerID field is = to the Me. ,,, expression, or whatever the necessary
> expression should be?
>
>
> "Jack Leach" wrote:
>
>> > I suspect that the "Me." or "Me!" "command" or "action" must be used, 
>> > but am
>> > not clear about how to use it.
>>
>> This Me keyword is probably one of the greatest tools available to
>> form/report programming, and you will be very happy to learn to use it.
>>
>> I would suggest, where possible (which is pretty much everwhere) to use 
>> the
>> Me. rather than the Me!   The bang operator (!) has a specific meaning 
>> that
>> is generally easily confusable.  The dot operator will, unlike the bang
>> operator, provide you with a list of available commands/actions that 
>> pertain
>> to Me (this list is called intellisense, and is quite handy)
>>
>> The keyword "Me" refers to the current form or report.  So lets say you 
>> have
>> a simple form with a textbox (which is named txtThisBox) and a button 
>> (which
>> is named btnThisButton), and the form itself is named frmThisForm.
>>
>> When you open frmThisForm, and go to the events and create an event
>> procedure, it brings you to the code module behind that form.  Because
>> txtThisBox and btnThisButton are members of frmThisForm, you can 
>> reference
>> them in this module.
>>
>> If you type "Me.", as soon as you hit the "." you will see a list pop up 
>> of
>> all the available methods, actions and controls pertaining to the form. 
>> So
>> lets pretend that you want to click on btnThisButton, and if there is an
>> entry in txtThisBox, use that entry in an sql statement, and change the
>> caption of the button to "SQL Ran" (I understand that this is not a 
>> likely
>> situation, but serves the purpose of example).
>>
>> Your event procedure for btnThisButton_Click may resemble something like
>> so...  notice how the Me keyword is used to reference the controls that 
>> are
>> on the form.
>>
>>
>>
>>
>> Private Sub btnThisButton_Click()
>>
>>   Dim strSQL As String 'to hold your sql until we run it
>>
>>   'if there's no value in txtThisBox exit the sub
>>   If Nz(Me.txtThisBox, "") = "" Then
>>     Exit Sub
>>   End If
>>
>>   'if we made it this far there was a value, so we'll continue...
>>   'lets enter the value into an sql string
>>
>>   strSQL = "DELETE * FROM tblThisTable WHERE " _
>>              &  "ThisField = '" & Me.txtThisBox & "'"
>>
>>   'now we have an sql string that has the value of the text
>>   'box inserted as criteria
>>
>>   CurrentDb.Execute strSQL
>>
>>   'now set the caption of the button to "SQL Ran"
>>
>>   Me.btnThisButton.Caption = "SQL Ran"
>>
>> End Sub
>>
>>
>>
>>
>>
>> Hopefully this sheds a little bit of light on the usage of the Me 
>> keyword.
>> Basically, in a form or report, this allows you to quickly and easily
>> reference all of the form/reports properties, actions, controls, methods, 
>> etc
>> etc.
>>
>> happy coding
>>
>> -- 
>> Jack Leach
>> www.tristatemachine.com
>>
>> "I haven't failed, I've found ten thousand ways that don't work."
>> -Thomas Edison (1847-1931)
>>
>>
>>
>> "nytwodees" wrote:
>>
>> > I am using Access 2000.
>> >
>> > I have a Command Button on a form that is designed to preview or print 
>> > that
>> > customer's invoice.
>> >
>> > I use a Pop-Up Dialog Box. The end user will supply 2 pieces of data in 
>> > this
>> > Dialog Box.  This data, together with the Customer ID from the current 
>> > form.
>> > will provide the 3 necessary pieces of info to pass on to the query, 
>> > and
>> > eventually the report, that creates the invoice.
>> >
>> > I suspect that the "Me." or "Me!" "command" or "action" must be used, 
>> > but am
>> > not clear about how to use it.
>> >
>> > Perhaps someone can give me some examples of how to use that "command" 
>> > or
>> > "action" with the proper syntax.  I've read the Help with no success. 
>> > It
>> > seems to be a important tool! 


0
Jeanette
12/8/2009 7:16:20 AM
Hi Jeanette:

Thanks again for your help!

If I understand you correctly all I need do is enter 
Forms![NameOfForm]![NameOfControl] in the criteria of the query's grid!

Then this is one of the methods to pass on a value to the query.   The other 
method is to pass on values from a Form's Dialog Box to the query.

So I am basically doing the same thing to pass on the 3 values, 1 from the 
Original Form and 2 from the Dialog Box Form.  Is that correct?

Tomorrow morning I will try your suggestion.

PS: There is no need for Me. or Me!  ????



"yJeanette Cunningham" wrote:

> You can use this type of thing in the criteria row of a query.
> Forms![NameOfForm]![NameOfControl]
> 
> Access can read the value of customer id from the open form and put in the 
> query.
> 
> You would want to do this if you are running the query while the form is 
> open,
> and if the query is not the record source of the form.
> 
> We are still trying to completely understand your question, so hope we are 
> getting closer to your scenario and an answer that will work for you.
> 
> 
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> 
> "nytwodees" <nytwodees@discussions.microsoft.com> wrote in message 
> news:79AA0D15-A131-416E-97BF-F229E0D45508@microsoft.com...
> > Thanks for your lengthy and informative response.  Unfortunately it did 
> > not
> > get me any further.
> >
> > Let me make myself clearer:
> >
> > 1. Suppose the field from my form that I want to capture and Pass on to my
> > query id CustomerID.  What code should I use?
> >
> > 2. How do I then enter it in my query so that the criteria for the
> > CustomerID field is = to the Me. ,,, expression, or whatever the necessary
> > expression should be?
> >

0
Utf
12/10/2009 3:23:57 AM
That's the idea.
You can't use Me. or Me! because the query is not part of the form.
You can only use Me. or Me! when code is running in the form and Me. refers 
to the form where the code is running.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"nytwodees" <nytwodees@discussions.microsoft.com> wrote in message 
news:30D49760-F56E-4D9C-A878-9389F10F5F78@microsoft.com...
> Hi Jeanette:
>
> Thanks again for your help!
>
> If I understand you correctly all I need do is enter
> Forms![NameOfForm]![NameOfControl] in the criteria of the query's grid!
>
> Then this is one of the methods to pass on a value to the query.   The 
> other
> method is to pass on values from a Form's Dialog Box to the query.
>
> So I am basically doing the same thing to pass on the 3 values, 1 from the
> Original Form and 2 from the Dialog Box Form.  Is that correct?
>
> Tomorrow morning I will try your suggestion.
>
> PS: There is no need for Me. or Me!  ????
>
>
>
> "yJeanette Cunningham" wrote:
>
>> You can use this type of thing in the criteria row of a query.
>> Forms![NameOfForm]![NameOfControl]
>>
>> Access can read the value of customer id from the open form and put in 
>> the
>> query.
>>
>> You would want to do this if you are running the query while the form is
>> open,
>> and if the query is not the record source of the form.
>>
>> We are still trying to completely understand your question, so hope we 
>> are
>> getting closer to your scenario and an answer that will work for you.
>>
>>
>> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>>
>> "nytwodees" <nytwodees@discussions.microsoft.com> wrote in message
>> news:79AA0D15-A131-416E-97BF-F229E0D45508@microsoft.com...
>> > Thanks for your lengthy and informative response.  Unfortunately it did
>> > not
>> > get me any further.
>> >
>> > Let me make myself clearer:
>> >
>> > 1. Suppose the field from my form that I want to capture and Pass on to 
>> > my
>> > query id CustomerID.  What code should I use?
>> >
>> > 2. How do I then enter it in my query so that the criteria for the
>> > CustomerID field is = to the Me. ,,, expression, or whatever the 
>> > necessary
>> > expression should be?
>> >
> 


0
Jeanette
12/11/2009 5:00:40 AM
Thanks Jeanette for all of your help.  I now get what I am looking for.

"Jeanette Cunningham" wrote:

> That's the idea.
> You can't use Me. or Me! because the query is not part of the form.
> You can only use Me. or Me! when code is running in the form and Me. refers 
> to the form where the code is running.
> 
> 
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> 
> "nytwodees" <nytwodees@discussions.microsoft.com> wrote in message 
> news:30D49760-F56E-4D9C-A878-9389F10F5F78@microsoft.com...
> > Hi Jeanette:
> >
> > Thanks again for your help!
> >
> > If I understand you correctly all I need do is enter
> > Forms![NameOfForm]![NameOfControl] in the criteria of the query's grid!
> >
> > Then this is one of the methods to pass on a value to the query.   The 
> > other
> > method is to pass on values from a Form's Dialog Box to the query.
> >
> > So I am basically doing the same thing to pass on the 3 values, 1 from the
> > Original Form and 2 from the Dialog Box Form.  Is that correct?
> >
> > Tomorrow morning I will try your suggestion.
> >
> > PS: There is no need for Me. or Me!  ????
> >
> >
> >
> > "yJeanette Cunningham" wrote:
> >
> >> You can use this type of thing in the criteria row of a query.
> >> Forms![NameOfForm]![NameOfControl]
> >>
> >> Access can read the value of customer id from the open form and put in 
> >> the
> >> query.
> >>
> >> You would want to do this if you are running the query while the form is
> >> open,
> >> and if the query is not the record source of the form.
> >>
> >> We are still trying to completely understand your question, so hope we 
> >> are
> >> getting closer to your scenario and an answer that will work for you.
> >>
> >>
> >> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
> >>
> >> "nytwodees" <nytwodees@discussions.microsoft.com> wrote in message
> >> news:79AA0D15-A131-416E-97BF-F229E0D45508@microsoft.com...
> >> > Thanks for your lengthy and informative response.  Unfortunately it did
> >> > not
> >> > get me any further.
> >> >
> >> > Let me make myself clearer:
> >> >
> >> > 1. Suppose the field from my form that I want to capture and Pass on to 
> >> > my
> >> > query id CustomerID.  What code should I use?
> >> >
> >> > 2. How do I then enter it in my query so that the criteria for the
> >> > CustomerID field is = to the Me. ,,, expression, or whatever the 
> >> > necessary
> >> > expression should be?
> >> >
> > 
> 
> 
> .
> 
0
Utf
12/14/2009 6:27:02 PM
Reply:

Similar Artilces:

Cannot log in using WindowsID (was able to before)
I just bought MS Money 2007 Deluxe yesterday. The install went smooth, without any issues. I registered a new WindowsID and was able to successfully log into MS Money. However, today when I tried to log into MS Money, the messge apeared that the "Money was not able to recognize your WindowsID" or something like it and that "You will still have access to some functions but will not be able to make online updates". Now I'm not able to make updates. Any idea what this could be? Is the authentication server for WindowsID down or something? See the post under Mon...

Filter with criteria!
Hello! I have 2 woorksheet. One contains raw data one is a summary sheet. In the raw data shhet, under the "catergory" column, I need to count and filter out all the Apples" in this column. The challege is , the number of apples counted should be from Jan, Feb and Mar respectively. Results counted must be shown in the second worksheet in Column A, B and C respectively, representing Jan Feb and Mar. Can I have the formulae for this ?Thank you.. -- help me Post few examples to show how your raw data is arranged. -- Jacob (MVP - Excel) "ernieta...

Can't use Merge feature
If I have a postcard file I've already made on the screen, when I try to pull up the "Merge" feature under Tools, it is shaded grey and I can't open it. It insists that I either form a new database list of addresses or edit the one that I want to merge. I don't want to edit the one I want to merge. I just want to MERGE it. If, however, I have just a postcard template on the screen (without it having been made into anything), I CAN pull up the "merge" feature under Tools. It is not shaded out. How do I un-shade the "merge" feature? To merg...

3-Color Scale Vlookup for Current Month/Previous/Pre-Previous
Is it possible to Conditionally Format a cell so that the colors are based off of VLOOKUP's? What I mean is I have a table on another tab and it has by month how complete the build is. I want the conditional format to color the percent of the current month red, percent of previous month yellow and pre-previous month green. I tried putting the formula =("41227-1",BuildData,18,FALSE) as the current, = ("41227-1",BuildData,17,FALSE) as the previous, and = ("41227-1",BuildData,16,FALSE) as the pre-previous. However, it uses only the cells value to colo...

Passing data from one form to another
Hello I have a form called frmMaindB and it has 5 text boxes on it (txtEmployeeTime, txtDTRegular, txtDTReason1, txtDTReason2, txtDTMaintenance) when I double click on the text box it opens up a pop up form named frm_DecimalConversion. On this form I have two text boxes one box I enter data into and the other calculates or converts the data to a decimal. The box that converts the data is called txtDecimal. Then I have a close button which I want to use to close the pop up form and insert the data into the text box I double clicked in to get the pop up or (frm_DecimalConversion). I have r...

how to query my web site from VBA and return a value to VBA
Hello All, From VBA I would like send a value to my web site, and have it return a value. I've learned how to use FollowHyperlink to send a value to an ASP script, but how can the ASP script send a value back to VBA?? Thanks, Brian Austin, TX You can use xmlhttp to make a request to your web page: '********************************************************* Sub Tester() MsgBox WebResponse("http://www.mydomain.com/myactualpage.asp? info=3Dblah") End Sub Private Function WebResponse(sURL As String) As String Dim XmlHttpRequest As Object Se...

data value in Form field if no table entry
I have a form with a field which pulls through and concentenates 2 fields called [ContactFirstname] and [ContactLastName]from my table There are however some customers for whom I do not have names and therefore instead I would like Sir/Madam to appear in the field in the form I think I have seen this done somewhere using ELSE? but can't find it Any help/ideas gratefully received Perhaps something like this: Nz(Trim([ContactFirstname] & " " + [ContactLastName]), "Sir/Madam") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access use...

Restore Exchange 5.5 on 2000 using ArcServe
I've got - Windows NT 4 Server SP6 - Exchange 5.5 SP3 - ArcServeIT 6.61 with Exchange Agent I'm trying to restore the Exchange information (database, mailbox... everything) on another computer. That computer has - Windows 2000 Server SP4 - Exchange 2000 - Brighstore ArcServe 9 (build 2020) with Exchange Agent ------------------- Now the situation: I need to verify that the backup was made correctly (entirely) in order to confirm the total validity of the backup (to validate my disaster recovery plan) and to update to SP4. I tried to find documentation with both Microsoft (for Ex...

How to use structured reference (ListColumns) in VBA
I want to do something simple...loop through a range retrieving values one at time and taking action on that value. This range is an Excel 2007 table column. Easy enough...BUT I want to use structured references to a table column by NAME, not numbers. I don't want to define new names, just use the table column headings. I've found ways of doing it with quotes, but that's not structured....the names in quotes do not change if the table heading is changed by the user. The formulas change if the table column heading is changed, but I want it to change in VBA to...

Error- Project is used by another user -Please select another proj
Please see the subject line, when im trying to open a particular project. it gives me following error. I checked the current users, there are no users. Apart from me. There are some non PA users,i tried to remove them from activity. inspite of me removing them from activity, im geting the same error. Help !!! Ramakrishnan Hello Ram, There is a stranded user in PA000001 table. You need to clear this User/Project combination. Ajay "Ram" wrote: > Please see the subject line, when im trying to open a particular project. > it gives me following error. > > I che...

object not being created
hello, I created a dialog based application.I pop up a modal dialog from the menu created in my application.Class midialog is associated with this dialog resource.By mistake i created an obj of this class in the menu handler as shown in code below. OnMenu()//handler in my application dialog class.i.e.main dialog { midialog m_d; m_d.DoModal();//creating my modal dialog } after couple of daysi realized that i wanted the obj not inside the handler but in the class CMainDlg(class of the main dialog).So i removed above code and tried to declare a variable of type midialog m_d(again,s...

Save As using contents of Cell in Name
Can someone help with code that changes the "save As" file name to combination of the original File Name + the contents of a cell, an saves file in same folder as the original. E.G. Original File Name= Timesheet Cells B1= Location Cell C1 = Date in format 3-5-2004 Cell A1 = concatenate(B1,C1) Fle Name will therefore be "Timesheet Location 3-5-2004" The other problem is with the date. When concatenating, how do I forma the date to avoid it looking like "Location 38051" Any help much appreciated Nic -- Message posted from http://www.ExcelForum.com Hi for c...

form and query problem. please help.
All tables are linked with weak entities. However, when i enter data on the form I can't get it to let me enter more than one partipicant without access generating a new invoice id. however i need one invoice to many participants. It wont work and i have no idea what to do at this point. in addition the workshop will not let me add workshop to invoice. this is a small mdb and i'd like to email it to anyone who can assist me with the relationships as I think this is the problem but I don't know what to do. please help me. INVOICE invoiceNO - autonumber invoice prices WORKSHOP wo...

Pulling counts out of query results
I have a query that has one field Type which is set to Count The query results are used in a report. The report has the fields in the detail section as TYPE and CountOfType (1 line only in the detail section) The report looks like this when displayed AS 28 AV 17 OR 5 I need to be able to get the individual AS No (28) and add it to another number elswhere in the report. How can I do this? I have tried using a textbox with an if function (if [type]="AS",CountOfType,0 but that did not work. Any help appreciated. Ray I think you will need to do it in the query. But try addi...

Using Excel in Mac office 2004 with Microsoft/Mac 2008:Analysis toolpack
Although I am disappointed with Office 2008 for Mac because of the absent of Analysis toolpack, I figured things out quite recently that I can still install my Mac office 2004 and use the excel package that contains the Analysis tool pack. How? ...... let me show you: 1. Insert your CD for Mac office 2004 2. When it open on your desk top, two options will be given to you to download the software (a) Office set-up assistant, and (b) Microsoft office 2004. 3. CHOOSE MICROSOFT OFFICE 2004 (Drag the icon onto your desk top) and it will start to run/download. 4. When done, this will appear as ...

How to obtain enumerated attribute declarations from a DTD using MSXML & VB?
I have a VB (VB6, not .NET) application that reads an XML file (using MSXML v3.2 parser); the XML file contains a reference to an external DTD. The DTD has numerous enumerated attribute declarations like so: <!ATTLIST MyElement MyAttribute (One | Two | Three) "One" > The VB code needs to generate dynamic pick-list for all the attributes that appear in the DTD as part of a data-entry application; each dynamically created pick list should contain all the allowable values for the attribute as defined by the DTD (and presented in some kind of multiple choice control like a comb...

Using Excel spreadsheet as input to Access
Hello, I posted this in the New Users forum but only got one answer, so thought I'd try here as well. Like so many others, I am an Excel newbie. I was a mainframe COBO programmer in another life, but that was a few years back My manager would like me to write an app that will take tracking dat from an existing Excel spreadsheet (generated by our system) but onl use a select handful of columns as input to a new Access database tha I will create. I'm guessing that I can either a) create a new edited spreadsheet to b used as input to the Access database or b) use the Import wiza...

HELP
We have an application that is used by over 8000 people worldwide. One of our users is just starting to have the following problem: Run-time error '-2147467259(80004005)': Method 'Add' of object 'CommandBarControls' failed I have read that this problem can be caused by trying to open the file in Internet Explorer. The user has told me that she has tried opening MS Excel and then the .xls file and she still gets the same problem when the file is trying to open. She is the only one that has had this problem. Could there be something wrong with her Excel settings or som...

Using subtotals as single data entries
Sorry about the subject--I couldn't figure out how to describe it simply. I have a large file (16,000 records) of amounts billed by roughly 10,000 service providers. A number of these providers have multiple office locations, so each record is unique to a specific office location. In other words, a provider who billed from 3 different office locations will have 3 entries. Each provider has a unique provider ID number, which stays the same regardless of which office location he is billing from. I want to be able to subtotal the amount billed by each provider for all their office locations...

Count Unique Items with Multiple Criteria
I am trying to get a list of how many lots a particular car model is on. For example, say we have a spreadsheet that looks like: Model License Lot Ford xjd-394 1 Chevy gwg-394 2 Ford sdf-333 1 Ford lkj-111 3 Toyota skd-333 4 Toyota shk-584 4 I am loking for a way to get data that says how many unique lots each car is on, so for example: Ford: 2 Chevy: 1 Toyota: 1 I was trying to do this with Pivot tables and the count functionality, but it isn't quite getting me the results I want. I can get the results with a pivot table ...

Using Risk+ with MSP 2007
We use Risk+ as a risk simulation tool. We have discovered that it works approximately 20 times SLOWER in MSP 2007 than MSP 2003. Has anyone else run into this problem. If so, is there a remedy? My hunch this not a generic issue, but surely best that you consult with the Risk+ people on this. --rms www.rmschneider.com On 02/03/10 18:08, Tom Mc wrote: > We use Risk+ as a risk simulation tool. We have discovered that it works > approximately 20 times SLOWER in MSP 2007 than MSP 2003. Has anyone else run > into this problem. If so, is there a remedy? W...

Can't insert rows
I am using Excel 2007 and have just loaded a spreadsheet created in a previous version which is running in Compatibility mode. When I try to insert a row I get an message "Cannot shift objects off sheet". How do I insert rows on this sheet? No problem with another workbook loaded at the same time which was created in 2007. See if this helps http://support.microsoft.com/default.aspx?kbid=211769 "Cannot shift objects off sheet" error message when you hide columns in Excel -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my...

how to use roundup
how to roundup the number to hundreds example 1250101 to 1250200 , 1250901 to 1251000 , 1250750 to 1250800 thank alot =ROUNDUP(A1,-2) -- Kind regards, Niek Otten "r4319hb" <r4319hb@discussions.microsoft.com> wrote in message news:A8D5EA24-858C-49D3-A5ED-481FEBEA36CB@microsoft.com... > how to roundup the number to hundreds example 1250101 to 1250200 , 1250901 > to > 1251000 , 1250750 to 1250800 > thank alot =CEILING(A1,100) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "r4319hb" <r4319hb@discussions.microsoft...

Using 'like' on a user prompt
I want to prompt the user for a value to use to filter a form. Here is my command with the WhereCondition: docmd.OpenForm "test", acNormal, , "LastName=[Enter a Last Name]" I want to use the WhereCondition as a "LIKE" criteria. Variations on the WhereCondition itself that I've tried include various combinations of LastName LIKE %...% LastName LIKE *...* LastName LIKE [%...%] LastName LIKE [*...*] You get the idea... No luck so far. Any thoughts? On Thu, 27 May 2010 21:52:50 GMT, "RicDon" <u60397@uwe> wrote: >I wan...

Using online services from Europe
I'm going to be temporarily stationed in Europe for a couple of months. Are there any problems with my using M2002 to access my accounts, pay bills, etc, from there just as I do from the US? TIA You should be fine, so long as you have a 128 bit encryption version of IE. If you do have problems, please feel free to post here :-) -- Glyn Simpson, Microsoft MVP - Money Check http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny for UK tips and fixes for MS Money. To send Microsoft your wishes or suggestions, use http://register.microsoft.com/mswish/suggestion.asp or email mnyukwsh...