Setting random number range based on query, not table

I have a "quiz" form that randomly pulls up questions from my table.  It 
works fine, and I don't mind that it repeats questions.  This allows me to 
sit and review for as long as I want.

The problem is, that I want to use criteria in a query to limit the 
available questions.  If I base this form on a query and limit the number of 
questions, the code I am using is still setting the maximum number as the 
number of records in my table.

In the past, I had a similar database (which I have lost) that would open 
the form, set the selector to the last record available to the form, then 
record that number as the max in my random setting.  I think this portion of 
the code was done in the event that fires when the form opens.

Can anyone help me change the following code so that I can do what I outline 
above?  I know I will have to move the "Dim NumOfRecords" line to my form's 
open event, and I will have to add a line to jump to the last record.  I'll 
also have to move the "NumOfRecs=..." statement to my form's open event.



Private Sub Next_Question_Click()
Dim MyValue As Long
Dim NumOfRecs As Long

Answer.Visible = False

NumOfRecs = DCount("*", "Questions - Art")
MyValue = Int((NumOfRecs * Rnd) + 1)
DoCmd.GoToRecord , , acGoTo, MyValue
End Sub




-- 
Thanks in advance!!

RBear3
..


0
RBear3
5/24/2007 12:07:54 PM
access.formscoding 7493 articles. 0 followers. Follow

6 Replies
647 Views

Similar Articles

[PageSpeed] 18

Hi

Use something like the following in the form's open event...

    With Me.RecordsetClone
        If .BOF And .EOF Then
            MsgBox "No Records"
        Else
            .MoveLast
            MsgBox .RecordCount 'obviously set your variable here!
        End If
    End With

hth

Regards

Andy Hull


"RBear3" wrote:

> I have a "quiz" form that randomly pulls up questions from my table.  It 
> works fine, and I don't mind that it repeats questions.  This allows me to 
> sit and review for as long as I want.
> 
> The problem is, that I want to use criteria in a query to limit the 
> available questions.  If I base this form on a query and limit the number of 
> questions, the code I am using is still setting the maximum number as the 
> number of records in my table.
> 
> In the past, I had a similar database (which I have lost) that would open 
> the form, set the selector to the last record available to the form, then 
> record that number as the max in my random setting.  I think this portion of 
> the code was done in the event that fires when the form opens.
> 
> Can anyone help me change the following code so that I can do what I outline 
> above?  I know I will have to move the "Dim NumOfRecords" line to my form's 
> open event, and I will have to add a line to jump to the last record.  I'll 
> also have to move the "NumOfRecs=..." statement to my form's open event.
> 
> 
> 
> Private Sub Next_Question_Click()
> Dim MyValue As Long
> Dim NumOfRecs As Long
> 
> Answer.Visible = False
> 
> NumOfRecs = DCount("*", "Questions - Art")
> MyValue = Int((NumOfRecs * Rnd) + 1)
> DoCmd.GoToRecord , , acGoTo, MyValue
> End Sub
> 
> 
> 
> 
> -- 
> Thanks in advance!!
> 
> RBear3
> ..
> 
> 
> 
0
Utf
5/24/2007 3:01:00 PM
I tried the following.  But, it goes to one record (I think the first one) 
and then just keeps pulling up that same question.  It is not jumping to 
random records.  Any ideas?

Private Sub Form_Open(Cancel As Integer)
Dim NumOfRecs As Long
With Me.RecordsetClone
    .MoveLast
    NumOfRecs = .RecordCount
End With
End Sub

Private Sub Next_Question_Click()
Dim MyValue As Long
Answer.Visible = False
MyValue = Int((NumOfRecs * Rnd) + 1)
DoCmd.GoToRecord , , acGoTo, MyValue
End Sub


-- 
Hope that helps!

RBear3
..

"Andy Hull" <AndyHull@discussions.microsoft.com> wrote in message 
news:FCC18DCA-CB86-4BBB-9F2E-B7AA312D80F5@microsoft.com...
> Hi
>
> Use something like the following in the form's open event...
>
>    With Me.RecordsetClone
>        If .BOF And .EOF Then
>            MsgBox "No Records"
>        Else
>            .MoveLast
>            MsgBox .RecordCount 'obviously set your variable here!
>        End If
>    End With
>
> hth
>
> Regards
>
> Andy Hull
>
>
> "RBear3" wrote:
>
>> I have a "quiz" form that randomly pulls up questions from my table.  It
>> works fine, and I don't mind that it repeats questions.  This allows me 
>> to
>> sit and review for as long as I want.
>>
>> The problem is, that I want to use criteria in a query to limit the
>> available questions.  If I base this form on a query and limit the number 
>> of
>> questions, the code I am using is still setting the maximum number as the
>> number of records in my table.
>>
>> In the past, I had a similar database (which I have lost) that would open
>> the form, set the selector to the last record available to the form, then
>> record that number as the max in my random setting.  I think this portion 
>> of
>> the code was done in the event that fires when the form opens.
>>
>> Can anyone help me change the following code so that I can do what I 
>> outline
>> above?  I know I will have to move the "Dim NumOfRecords" line to my 
>> form's
>> open event, and I will have to add a line to jump to the last record. 
>> I'll
>> also have to move the "NumOfRecs=..." statement to my form's open event.
>>
>>
>>
>> Private Sub Next_Question_Click()
>> Dim MyValue As Long
>> Dim NumOfRecs As Long
>>
>> Answer.Visible = False
>>
>> NumOfRecs = DCount("*", "Questions - Art")
>> MyValue = Int((NumOfRecs * Rnd) + 1)
>> DoCmd.GoToRecord , , acGoTo, MyValue
>> End Sub
>>
>>
>>
>>
>> -- 
>> Thanks in advance!!
>>
>> RBear3
>> ..
>>
>>
>> 


0
RBear3
5/24/2007 3:29:27 PM
FYI...

I put back in the message box, just to make sure I have more than one record 
in my form.  I do have 30 records in the recordset.

-- 
Hope that helps!

RBear3
..

"RBear3" <rbear3@nospam.com> wrote in message 
news:uZK3RhhnHHA.3888@TK2MSFTNGP03.phx.gbl...
>I tried the following.  But, it goes to one record (I think the first one) 
>and then just keeps pulling up that same question.  It is not jumping to 
>random records.  Any ideas?
>
> Private Sub Form_Open(Cancel As Integer)
> Dim NumOfRecs As Long
> With Me.RecordsetClone
>    .MoveLast
>    NumOfRecs = .RecordCount
> End With
> End Sub
>
> Private Sub Next_Question_Click()
> Dim MyValue As Long
> Answer.Visible = False
> MyValue = Int((NumOfRecs * Rnd) + 1)
> DoCmd.GoToRecord , , acGoTo, MyValue
> End Sub
>
>
> -- 
> Hope that helps!
>
> RBear3
> .
>
> "Andy Hull" <AndyHull@discussions.microsoft.com> wrote in message 
> news:FCC18DCA-CB86-4BBB-9F2E-B7AA312D80F5@microsoft.com...
>> Hi
>>
>> Use something like the following in the form's open event...
>>
>>    With Me.RecordsetClone
>>        If .BOF And .EOF Then
>>            MsgBox "No Records"
>>        Else
>>            .MoveLast
>>            MsgBox .RecordCount 'obviously set your variable here!
>>        End If
>>    End With
>>
>> hth
>>
>> Regards
>>
>> Andy Hull
>>
>>
>> "RBear3" wrote:
>>
>>> I have a "quiz" form that randomly pulls up questions from my table.  It
>>> works fine, and I don't mind that it repeats questions.  This allows me 
>>> to
>>> sit and review for as long as I want.
>>>
>>> The problem is, that I want to use criteria in a query to limit the
>>> available questions.  If I base this form on a query and limit the 
>>> number of
>>> questions, the code I am using is still setting the maximum number as 
>>> the
>>> number of records in my table.
>>>
>>> In the past, I had a similar database (which I have lost) that would 
>>> open
>>> the form, set the selector to the last record available to the form, 
>>> then
>>> record that number as the max in my random setting.  I think this 
>>> portion of
>>> the code was done in the event that fires when the form opens.
>>>
>>> Can anyone help me change the following code so that I can do what I 
>>> outline
>>> above?  I know I will have to move the "Dim NumOfRecords" line to my 
>>> form's
>>> open event, and I will have to add a line to jump to the last record. 
>>> I'll
>>> also have to move the "NumOfRecs=..." statement to my form's open event.
>>>
>>>
>>>
>>> Private Sub Next_Question_Click()
>>> Dim MyValue As Long
>>> Dim NumOfRecs As Long
>>>
>>> Answer.Visible = False
>>>
>>> NumOfRecs = DCount("*", "Questions - Art")
>>> MyValue = Int((NumOfRecs * Rnd) + 1)
>>> DoCmd.GoToRecord , , acGoTo, MyValue
>>> End Sub
>>>
>>>
>>>
>>>
>>> -- 
>>> Thanks in advance!!
>>>
>>> RBear3
>>> ..
>>>
>>>
>>>
>
> 


0
RBear3
5/24/2007 3:33:53 PM
Okay, I added a msgbox that pops up "NumOfRecs" inside the OnClick section. 
It is always blank.

Why is my "NumOfRecs" 30 when I look at it in the "form open" event, but it 
is null in my "on click" event.

Why is the value not getting passed to my "on click" section?

Do I need to make "NumOfRecs" public so that it is passed to other parts of 
the code?  If so, How do I do that?



-- 
Thanks!

RBear3
..

"RBear3" <rbear3@nospam.com> wrote in message 
news:uZK3RhhnHHA.3888@TK2MSFTNGP03.phx.gbl...
>I tried the following.  But, it goes to one record (I think the first one) 
>and then just keeps pulling up that same question.  It is not jumping to 
>random records.  Any ideas?
>
> Private Sub Form_Open(Cancel As Integer)
> Dim NumOfRecs As Long
> With Me.RecordsetClone
>    .MoveLast
>    NumOfRecs = .RecordCount
> End With
> End Sub
>
> Private Sub Next_Question_Click()
> Dim MyValue As Long
> Answer.Visible = False
> MyValue = Int((NumOfRecs * Rnd) + 1)
> DoCmd.GoToRecord , , acGoTo, MyValue
> End Sub
>
>
> -- 
> Hope that helps!
>
> RBear3
> .
>
> "Andy Hull" <AndyHull@discussions.microsoft.com> wrote in message 
> news:FCC18DCA-CB86-4BBB-9F2E-B7AA312D80F5@microsoft.com...
>> Hi
>>
>> Use something like the following in the form's open event...
>>
>>    With Me.RecordsetClone
>>        If .BOF And .EOF Then
>>            MsgBox "No Records"
>>        Else
>>            .MoveLast
>>            MsgBox .RecordCount 'obviously set your variable here!
>>        End If
>>    End With
>>
>> hth
>>
>> Regards
>>
>> Andy Hull
>>
>>
>> "RBear3" wrote:
>>
>>> I have a "quiz" form that randomly pulls up questions from my table.  It
>>> works fine, and I don't mind that it repeats questions.  This allows me 
>>> to
>>> sit and review for as long as I want.
>>>
>>> The problem is, that I want to use criteria in a query to limit the
>>> available questions.  If I base this form on a query and limit the 
>>> number of
>>> questions, the code I am using is still setting the maximum number as 
>>> the
>>> number of records in my table.
>>>
>>> In the past, I had a similar database (which I have lost) that would 
>>> open
>>> the form, set the selector to the last record available to the form, 
>>> then
>>> record that number as the max in my random setting.  I think this 
>>> portion of
>>> the code was done in the event that fires when the form opens.
>>>
>>> Can anyone help me change the following code so that I can do what I 
>>> outline
>>> above?  I know I will have to move the "Dim NumOfRecords" line to my 
>>> form's
>>> open event, and I will have to add a line to jump to the last record. 
>>> I'll
>>> also have to move the "NumOfRecs=..." statement to my form's open event.
>>>
>>>
>>>
>>> Private Sub Next_Question_Click()
>>> Dim MyValue As Long
>>> Dim NumOfRecs As Long
>>>
>>> Answer.Visible = False
>>>
>>> NumOfRecs = DCount("*", "Questions - Art")
>>> MyValue = Int((NumOfRecs * Rnd) + 1)
>>> DoCmd.GoToRecord , , acGoTo, MyValue
>>> End Sub
>>>
>>>
>>>
>>>
>>> -- 
>>> Thanks in advance!!
>>>
>>> RBear3
>>> ..
>>>
>>>
>>>
>
> 


0
RBear3
5/24/2007 4:50:48 PM
OKAY, I got it.  I had to make that variable public.  Here is my code (in 
case anyone else looks at this thread)...



Option Compare Database

Public NumOfRecs As Long

Private Sub Form_Current()
Show_Answer.SetFocus
End Sub

Private Sub Form_Open(Cancel As Integer)
Answer.Visible = False

With Me.RecordsetClone
    .MoveLast
    NumOfRecs = .RecordCount
End With

End Sub

Private Sub Next_Question_Click()
Dim MyValue As Long

Answer.Visible = False

MyValue = Int((NumOfRecs * Rnd) + 1)
DoCmd.GoToRecord , , acGoTo, MyValue
End Sub

Private Sub Show_answer_Click()
    Answer.Visible = True
    Next_Question.SetFocus
End Sub

Private Sub Text15_Click()
    Me.Pictures.SetFocus
End Sub




-- 
Hope that helps!

RBear3
..

"RBear3" <rbear3@nospam.com> wrote in message 
news:uZK3RhhnHHA.3888@TK2MSFTNGP03.phx.gbl...
>I tried the following.  But, it goes to one record (I think the first one) 
>and then just keeps pulling up that same question.  It is not jumping to 
>random records.  Any ideas?
>
> Private Sub Form_Open(Cancel As Integer)
> Dim NumOfRecs As Long
> With Me.RecordsetClone
>    .MoveLast
>    NumOfRecs = .RecordCount
> End With
> End Sub
>
> Private Sub Next_Question_Click()
> Dim MyValue As Long
> Answer.Visible = False
> MyValue = Int((NumOfRecs * Rnd) + 1)
> DoCmd.GoToRecord , , acGoTo, MyValue
> End Sub
>
>
> -- 
> Hope that helps!
>
> RBear3
> .
>
> "Andy Hull" <AndyHull@discussions.microsoft.com> wrote in message 
> news:FCC18DCA-CB86-4BBB-9F2E-B7AA312D80F5@microsoft.com...
>> Hi
>>
>> Use something like the following in the form's open event...
>>
>>    With Me.RecordsetClone
>>        If .BOF And .EOF Then
>>            MsgBox "No Records"
>>        Else
>>            .MoveLast
>>            MsgBox .RecordCount 'obviously set your variable here!
>>        End If
>>    End With
>>
>> hth
>>
>> Regards
>>
>> Andy Hull
>>
>>
>> "RBear3" wrote:
>>
>>> I have a "quiz" form that randomly pulls up questions from my table.  It
>>> works fine, and I don't mind that it repeats questions.  This allows me 
>>> to
>>> sit and review for as long as I want.
>>>
>>> The problem is, that I want to use criteria in a query to limit the
>>> available questions.  If I base this form on a query and limit the 
>>> number of
>>> questions, the code I am using is still setting the maximum number as 
>>> the
>>> number of records in my table.
>>>
>>> In the past, I had a similar database (which I have lost) that would 
>>> open
>>> the form, set the selector to the last record available to the form, 
>>> then
>>> record that number as the max in my random setting.  I think this 
>>> portion of
>>> the code was done in the event that fires when the form opens.
>>>
>>> Can anyone help me change the following code so that I can do what I 
>>> outline
>>> above?  I know I will have to move the "Dim NumOfRecords" line to my 
>>> form's
>>> open event, and I will have to add a line to jump to the last record. 
>>> I'll
>>> also have to move the "NumOfRecs=..." statement to my form's open event.
>>>
>>>
>>>
>>> Private Sub Next_Question_Click()
>>> Dim MyValue As Long
>>> Dim NumOfRecs As Long
>>>
>>> Answer.Visible = False
>>>
>>> NumOfRecs = DCount("*", "Questions - Art")
>>> MyValue = Int((NumOfRecs * Rnd) + 1)
>>> DoCmd.GoToRecord , , acGoTo, MyValue
>>> End Sub
>>>
>>>
>>>
>>>
>>> -- 
>>> Thanks in advance!!
>>>
>>> RBear3
>>> ..
>>>
>>>
>>>
>
> 


0
RBear3
5/24/2007 4:54:56 PM
Hi

Glad that helped and that you got it working.

Just for your info, my original reply had the following as part of it...
> >>        If .BOF And .EOF Then
> >>            MsgBox "No Records"
> >>        Else

You ought to check that BOF & EOF (Beginning and End Of File) aren't both 
True because if they are this means there are no records and when you try to 
do the .MoveLast you will get an error. If you know there is always going to 
be at least one record then no problem.

Regards

Andy Hull


"RBear3" wrote:

> OKAY, I got it.  I had to make that variable public.  Here is my code (in 
> case anyone else looks at this thread)...
> 
> 
> 
> Option Compare Database
> 
> Public NumOfRecs As Long
> 
> Private Sub Form_Current()
> Show_Answer.SetFocus
> End Sub
> 
> Private Sub Form_Open(Cancel As Integer)
> Answer.Visible = False
> 
> With Me.RecordsetClone
>     .MoveLast
>     NumOfRecs = .RecordCount
> End With
> 
> End Sub
> 
> Private Sub Next_Question_Click()
> Dim MyValue As Long
> 
> Answer.Visible = False
> 
> MyValue = Int((NumOfRecs * Rnd) + 1)
> DoCmd.GoToRecord , , acGoTo, MyValue
> End Sub
> 
> Private Sub Show_answer_Click()
>     Answer.Visible = True
>     Next_Question.SetFocus
> End Sub
> 
> Private Sub Text15_Click()
>     Me.Pictures.SetFocus
> End Sub
> 
> 
> 
> 
> -- 
> Hope that helps!
> 
> RBear3
> ..
> 
> "RBear3" <rbear3@nospam.com> wrote in message 
> news:uZK3RhhnHHA.3888@TK2MSFTNGP03.phx.gbl...
> >I tried the following.  But, it goes to one record (I think the first one) 
> >and then just keeps pulling up that same question.  It is not jumping to 
> >random records.  Any ideas?
> >
> > Private Sub Form_Open(Cancel As Integer)
> > Dim NumOfRecs As Long
> > With Me.RecordsetClone
> >    .MoveLast
> >    NumOfRecs = .RecordCount
> > End With
> > End Sub
> >
> > Private Sub Next_Question_Click()
> > Dim MyValue As Long
> > Answer.Visible = False
> > MyValue = Int((NumOfRecs * Rnd) + 1)
> > DoCmd.GoToRecord , , acGoTo, MyValue
> > End Sub
> >
> >
> > -- 
> > Hope that helps!
> >
> > RBear3
> > .
> >
> > "Andy Hull" <AndyHull@discussions.microsoft.com> wrote in message 
> > news:FCC18DCA-CB86-4BBB-9F2E-B7AA312D80F5@microsoft.com...
> >> Hi
> >>
> >> Use something like the following in the form's open event...
> >>
> >>    With Me.RecordsetClone
> >>        If .BOF And .EOF Then
> >>            MsgBox "No Records"
> >>        Else
> >>            .MoveLast
> >>            MsgBox .RecordCount 'obviously set your variable here!
> >>        End If
> >>    End With
> >>
> >> hth
> >>
> >> Regards
> >>
> >> Andy Hull
> >>
> >>
> >> "RBear3" wrote:
> >>
> >>> I have a "quiz" form that randomly pulls up questions from my table.  It
> >>> works fine, and I don't mind that it repeats questions.  This allows me 
> >>> to
> >>> sit and review for as long as I want.
> >>>
> >>> The problem is, that I want to use criteria in a query to limit the
> >>> available questions.  If I base this form on a query and limit the 
> >>> number of
> >>> questions, the code I am using is still setting the maximum number as 
> >>> the
> >>> number of records in my table.
> >>>
> >>> In the past, I had a similar database (which I have lost) that would 
> >>> open
> >>> the form, set the selector to the last record available to the form, 
> >>> then
> >>> record that number as the max in my random setting.  I think this 
> >>> portion of
> >>> the code was done in the event that fires when the form opens.
> >>>
> >>> Can anyone help me change the following code so that I can do what I 
> >>> outline
> >>> above?  I know I will have to move the "Dim NumOfRecords" line to my 
> >>> form's
> >>> open event, and I will have to add a line to jump to the last record. 
> >>> I'll
> >>> also have to move the "NumOfRecs=..." statement to my form's open event.
> >>>
> >>>
> >>>
> >>> Private Sub Next_Question_Click()
> >>> Dim MyValue As Long
> >>> Dim NumOfRecs As Long
> >>>
> >>> Answer.Visible = False
> >>>
> >>> NumOfRecs = DCount("*", "Questions - Art")
> >>> MyValue = Int((NumOfRecs * Rnd) + 1)
> >>> DoCmd.GoToRecord , , acGoTo, MyValue
> >>> End Sub
> >>>
> >>>
> >>>
> >>>
> >>> -- 
> >>> Thanks in advance!!
> >>>
> >>> RBear3
> >>> ..
> >>>
> >>>
> >>>
> >
> > 
> 
> 
> 
0
Utf
5/25/2007 9:57:01 AM
Reply:

Similar Artilces:

Microsoft betrayed yet another customer base 08-21-10
Microsoft acquired a company in 2008 that have been making a 3D modeling and animation software for more than 20 years, and discontinued it a year latter. No more updates, nada. The software has a huge following, including in Hollywood. Microsoft made the software free, but for the many who already paid for it there are no updates and no guarantees that the software would work on future versions of Windows, and their graphics assets are stuck in the current version. http://en.wikipedia.org/wiki/TrueSpace Nobody submitted this idea : > Microsoft acquired a company in 2...

Workflow email based on ownership
I have a need to send an email to the owner of any new opportunities that are created. But I only want to do that if the user creating the opportunity is not the owner. I see no reason to send the opp owner an email if he/she is the one that just created it. They obviously already know they have a new one. I wanted to put something like... if Opportunity.<Owner> <> Opportunity.Created By' then send email endif but there doesn't appear to by access to the created by or modified by attributes in workflow. So short of a custom assembly, is there any way to send an...

RE: Setting up the Goal function in MOney 2004
Once I have setup my budget and money reconizes I have x amount of extra money every month I try and use the goal fuction by setting up furture large purchases and I keep getting the error that savings goal unreachable even though I have enough money to reach goal ...

Pivot table export data to table format
I have a pivot table with the row heading listed once for multiple crosstab line items. I need to use this data for a report that will list the row heading on each row for each cross tab line item. Is this possible? I have tried everything... nothing seems to work. You can't get the heading labels to repeat in the pivot table. You could copy the pivot table, and paste as values on a different sheet in the workbook. Then, fill the blank cells, and format the copy of the pivot table. There are instructions here for filling in the blank cells: http://www.contextures.com/xlDataEntr...

count number of cells
What is the formula to count the number of cells that start with a particular character? What I really want to do is count how the number of cells in a column that start with a through e. I have tried several things but can't quite come up with the magic formula. thanks for your help. =COUNTIF(A1:A20,"A*")+COUNTIF(A1:A20,"B*")+COUNTIF(A1:A20,"C*")+COUNTIF(A1:A20,"D*")+COUNTIF(A1:A20,"E*") -- David Biddulph "tagout" <tagout@discussions.microsoft.com> wrote in message news:2B624B5C-E73A-4481-A3E7-C9207F72DAB...

Re: in VBA
Didn 't finish that "Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote in message news:... > > "Dennis" <dmburgess@removespamameritech.net> wrote in message > news:8r3i10hjgdeqo5q8urmvbuno799dhne7j2@4ax.com... > Bob, > > I am using Walkenbach's 2003 Book with CD and Google Search. > > I first query the CD using various "finds." In over 1000 pages there was no > reference to my specific question. Then I went to Google also with no > answer. > Well that's good, although I am sure this answer is alrea...

address book set to contacts
Subject: Re: address book set to 3/25/2004 6:56 AM PST By: Brian Tillman (search by author) In: microsoft.public.outlook DaveB <anonymous@discussions.microsoft.com> wrote > When ever I want to write a new email I click on new and then when > try to select a name from my address book the default lookup i > accounts, but all of my names in outlook are in contacts. Is there > way that I can make the default lookup contacts instead of account > so that I don't always have to change it each time I want to write a > email? Outlook version -- 2004 Unless you ar...

How do set up brochures on 8 1/2 x 14 paper
How do I set up a 4 panel brochure on 8 1/2 x 14 paper (landscape) in Publisher? Setup your printer first, if your printer doesn't say 8.5 x 14 it may have legal which is the same. If you are using a brochure template, once you select the template change the printer setup to legal, Publisher will automatically change the brochure to the correct size. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "TracksAll" <TracksAll@discussions.microsoft.com> wrote in message news:02E934C1-5FA1-44D3-9F03-78AC8F2B1ECB@micr...

Appended field in query
1. Can I make and appended field form 2 fields in a query (NOT A TABLE). The fields are mnemonic2 and mnemonic3 in qry_mnemonic based on an unchangable table PDM? or 2. Can I attach [Forms]![mnemonics]![combobox1] to each field in the query so I can do a partial lookup of both fields in this unbound combobox? I have tried this with no luck. I can only attach to one field and have it work. The form is a popup form attached to a report by a macro. I am a novice so please be specific. Carl if you're having trouble getting the query to work when you use the same form control as cr...

Help setting the gridlines on a XY Scatter chart with vba
I want to format the gridlines but I get an error claiming it can't change the MinimumScale. Here is the format I would like to use for the gridlines .MinimumScale = 0 .MaximumScale = 5 .MinorUnitIsAuto = True .MajorUnit = 1.667 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone Here is my code Private Sub CommandButton1_Click() Sheets("Report").Activate Dim WS As Worksheet Dim Cht As Chart Dim Rng As Range Dim iRow As Long Set WS = ActiveSheet Set Cht = Charts.Add Cht.C...

Checking for currency value between range
I have two txtboxes (txtWeeklyAllowanceLow, txtWeeklyAllowanceHigh) on a search form that I would like to use to find all weekly allowances on a table that fall within the range specified. Also if only a low amount is entered, then I would like all allowances greater than the amount to display, or if only a high amount then all allowances less than what is given. Any help with how I should code this would be great. thanks! Ok. Update. I seem to have the filter working for the high as well as the between, but now the low seems to not work. Here is the relevant code so far.. 'If W...

Importing Outlook emails into an Access table
I know that I can import data from my Outlook inbox by going to File -> Get External Data -> Import -> Select Files Of Type Outlook() etc... using the wizard but can this be done systemically via VBA code similarly to transfer text. I actually need to import data from a group account at work. I have searched hi and low through the Newsgroups and web and have found nothing. Any help would be much appreciated. Thanks to all in advance, Markco NEWSGROUPS wrote: > I know that I can import data from my Outlook inbox by going to File -> Get > External Data -> Import -...

Joining queries in advanced find
Hi, We are having a major issue with one of our CRM customers. They are trying to do a mail merge via word but cannot get the data they required into a single view via advanced find in CRM. The reason for this is that you cannot seem to outer join 2 queries within an advanced find. We can see 2 ways to achieve what we need – could you or one of your colleagues advise on the solutions below: 1) How can we search 2 or more relationships, so that if a match is found in either, the result is returned? E.g. Entity A may be related to Entity B or Entity C, both of which are related to...

Serial Number Tracking
Hi, I have a client that wants to only allcocate serial numbers when completing the fulfillment process. Does anyone know of any other clients that do this and what methods are they using - modifcation, third party product, and/or business process to achieve this. THANKS LB That is common in a manufacturing situatuation. If you want that, you will have to get a manufacturing add-on with GP. HS "Linda Bain" <Linda.Bain@Skytec.com> wrote in message news:1aeb01c46f77$a8b370e0$a301280a@phx.gbl... > Hi, > > I have a client that wants to only allcocate serial >...

Setting Excel Macro Security to "low" permanently.
Hi, How can I set the macro security level to "low" so that it remains low when I open a new excel sheet? Now, it is being set to the default "Medium" everytime I open Excel. Any help is greatly appreciated. This setting is stored in the windows registry. It sounds like your system administrator has set it up so that you can't save your setting. You may want to contact your IT department to see if they can change it for you. If you're a single user (under winXP???), then maybe it was that you installed as a Admin--not as the user. (I don't speak winXP, th...

How do I lower numbers in equation? For example, CO2
When I type an equation, such as C6H12O6 + 6O2, the numbers should be slightly lower that the letters. How can I do that? Select the numbers and press Ctlr+= to subscript them. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "pateepat" <pateepat@discussions.microsoft.com> wrote in message news:6E0FCBD3-BEFD-4D2F-8182-6F72BAE30006@microsoft.com... > When I type an equation, such as C6H12O6 + 6O2, the numbers should be > slightly lower that the letters. How can I do that? On Fri, 5 Mar 2010 18...

Group Count with no Details
I have a report with 2 groups. First group is called "Outcome" and the second group is called "Result". I was able to get a head count of results by inserting an unbound text. My question is how can I get a running total from the Results group? I hope that makes sense. Thank you NFL wrote: >I have a report with 2 groups. First group is called "Outcome" and the >second group is called "Result". I was able to get a head count of results >by inserting an unbound text. My question is how can I get a running total >fro...

Report Writer
I want to add a table (HR_EMPLOYEE_EXTRA) to the HR Employee Emergency Contact report. Can this be done? I looked but could not find a way to do it through Report Writer. I'm sure there must be a way but it'll take some more looking. It would be much easier to build a report using SmartList Builder or a different report writer. -- Charles Allen, MVP "Bob Harrison" wrote: > I want to add a table (HR_EMPLOYEE_EXTRA) to the HR Employee Emergency > Contact report. Can this be done? ------=_NextPart_0001_8D212269 Content-Type: text/plain Content-Transfer-Enco...

Number validation
I am having a problem forcing someone to enter a number only between 0 and 100 in a cell. I thought it was relatively simple with data validation, ie whole number between 0 and 100, or using a custom validation like =ISNUMBER(C8). Thia works until someone enters a percentage eg 10%. The cell accepts this as a number and at the same time converts the cell to a percentage format. Is there any way I can allow the entry of a number only between 0 and 100 and not accept the % at the end of the number. Grateful for any guidance. Kind regards Graham Haughs Turriff Scotland Hi one idea use the for...

display plus sign on plus numbers in Excel
I am trying to make number greater than 0 show the plus sign. You could give it a custom format via format|Cells|number tab Custom category type: +General;-General;0;@ positive format;negative format;0;text is the order of that string. tnoble wrote: > > I am trying to make number greater than 0 show the plus sign. -- Dave Peterson ...

DNS return queries through isa2000 for exchange
I recently stared having a problem where our email is being returned without delivery from comcast email servers. The return message is the following: <mail.XXXXXX.com #5.5.0 smtp;521-EHLO/HELO from sender ###.###.###.### does not map to mail.XXXXXX.com in DNS> (### is the ip address of the isa server) I'm guessing that they recently started requiring a matching DNS reply before accepting incoming email. I haven't changed anything on my end so that is why I assume the change came from them. My exchange server is on the inside (NATed) of the network. The IP address we have...

query the state of a global
Regarding win32 is, there some api to query the state of a global event(signal or non-signal)? I didn't find one in the MSDN. Regards Mark "Mark" <mark@intern.net> wrote in message news:OSiKcYmEIHA.5856@TK2MSFTNGP04.phx.gbl... > Regarding win32 is, there some api to query the state of a global > event(signal or non-signal)? > I didn't find one in the MSDN. > I couldn't find one either, but perhaps you could call WaitForSingleObject() with a timeout of 0, then check the return value to see if it returned WAIT_OBJECT_0 because the event was set...

Re: Text and numbers
Using Excel 2003 I want to get the sum of cells containing numbers, but the these cells also contain some text. I only want the sum of the numbers. Please help. P Hi Paul, =SUM(A1:A20) or any other range will ignore cells with text values, and ignore empty cells --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "paul" <WEBB234@prodigy.net> wrote in message news:tmd5g.500$zR3.124@newssvr33.news.prodigy.com... &g...

Auto-numbering a list
I have a data base which prints a report based upon starting dates. When I print the report, I want the list to print a number to the left of each name which starts with the number "1" and goes to the end of the list. The list may change, but I still want the numbering to work the same. Is there anything in Access which can do this, or do I need to write some code? Thanks for the help. -- Howard On Thu, 31 Dec 2009 05:43:01 -0800, Howard <Howard@discussions.microsoft.com> wrote: Yes, there is a simple and elegant solution. Create a textbox to hold the valu...

Sorting exchange mail based on to:
Hey there, we're trying to sort e-mail based on the to: address. This is an exchange mailbox on which the user has several SMTP addresses. There's an option (freely translated from dos) to filter on text in the addressees address. So say the customer has info@domain.tld we tried filtering on "info" or "info@domain.tld" but nothing happens. Viewing the message properties (headers) it's clearly visible the message is addressed "To: info@domain.tld". Anyway to sort this? It concerns Outlook 2003/SP3 Exchange 2003/SP2 btw. TIA ...