Skip pattern based on text box value

Hi, I have a text control. People will be typing either words or
numbers into it. If they type 99 I want to skip down several
questions. Here's the condition for my macro:

[Forms]![frmFB213]![FB215]=99

The action is 'Go to control' and the control name points to question
FB229. I've put my macro in the AfterUpdate section, but nothing is
happening. I'm suspecting this is because the answer is free-text. All
my skip patterns based on combo boxes are working well. I've tried
putting single and double quotes around the 99, I've tried using the
"Like" feature with 99 in and not in quotes. Can anyone tell me what
I'm missing? Thanks so much!

0
laeldo
6/2/2010 5:45:49 PM
access.forms 6864 articles. 2 followers. Follow

8 Replies
1983 Views

Similar Articles

[PageSpeed] 15

What is the data type of the field underlying that control on the form?

Are you saying that you have one control per question?  If so, what happens 
when you add/remove a question?  Doesn't that require you to modify all your 
forms, queries, etc.?

Regards

Jeff Boyce
Microsoft Access MVP

-- 
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laeldo" <laura.e.dodge@gmail.com> wrote in message 
news:788e67b4-f277-40a7-b7b0-5ab4bd2af8df@l6g2000vbo.googlegroups.com...
> Hi, I have a text control. People will be typing either words or
> numbers into it. If they type 99 I want to skip down several
> questions. Here's the condition for my macro:
>
> [Forms]![frmFB213]![FB215]=99
>
> The action is 'Go to control' and the control name points to question
> FB229. I've put my macro in the AfterUpdate section, but nothing is
> happening. I'm suspecting this is because the answer is free-text. All
> my skip patterns based on combo boxes are working well. I've tried
> putting single and double quotes around the 99, I've tried using the
> "Like" feature with 99 in and not in quotes. Can anyone tell me what
> I'm missing? Thanks so much!
> 


0
Jeff
6/2/2010 8:57:32 PM
Jeff Boyce;3741109 Wrote: 
> What is the data type of the field underlying that control on the form?
> 
> Are you saying that you have one control per question?  If so, what
> happens 
> when you add/remove a question?  Doesn't that require you to modify all
> your 
> forms, queries, etc.?
> 
> Regards
> 
> Jeff Boyce
> Microsoft Access MVP
> 
> -- 
> Disclaimer: This author may have received products and services
> mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
> 
> Any code or pseudocode included in this post is offered "as is", with
> no
> guarantee as to suitability.
> 
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
> 
> "laeldo" laura.e.dodge@gmail.com wrote in message 
> news:788e67b4-f277-40a7-b7b0-5ab4bd2af8df@l6g2000vbo.googlegroups.com...-
> Hi, I have a text control. People will be typing either words or
> numbers into it. If they type 99 I want to skip down several
> questions. Here's the condition for my macro:
> 
> [Forms]![frmFB213]![FB215]=99
> 
> The action is 'Go to control' and the control name points to question
> FB229. I've put my macro in the AfterUpdate section, but nothing is
> happening. I'm suspecting this is because the answer is free-text. All
> my skip patterns based on combo boxes are working well. I've tried
> putting single and double quotes around the 99, I've tried using the
> "Like" feature with 99 in and not in quotes. Can anyone tell me what
> I'm missing? Thanks so much!
> -

The aim is to fix problems and all concerns as to who makes the hardware
or software. Expect more. IT support Los Angeles and small business
consulting offers premier small business computer consulting and managed
IT services paired with easy access to computer sales and order
management via online computer stores and help centers.

=====================
*'Project Management Software' (http://www.project-drive.net/)*




-- 
sandypeter111
0
sandypeter111
6/3/2010 9:49:49 AM
Hi Jeff,

The data type under the control is Text. This project is for data
entry for a large questionnaire. So each question on the questionnaire
has a control on the form for an answer. If I need to add questions it
doesn't screw up the numbers because they are already assigned on the
paper questionnaire. If I need space for another answer because the
respondent checked two boxes instead of just one, the question becomes
210a, 210b, etc. Is that what you're asking? Thanks!



0
laeldo
6/3/2010 12:10:52 PM
Not sure how this responds to the original poster's request...

Regards

Jeff Boyce
Microsoft Access MVP

-- 
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"sandypeter111" <sandypeter111.64d4198@officefrustration.com> wrote in 
message news:sandypeter111.64d4198@officefrustration.com...
>
> Jeff Boyce;3741109 Wrote:
>> What is the data type of the field underlying that control on the form?
>>
>> Are you saying that you have one control per question?  If so, what
>> happens
>> when you add/remove a question?  Doesn't that require you to modify all
>> your
>> forms, queries, etc.?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
>> -- 
>> Disclaimer: This author may have received products and services
>> mentioned
>> in this post. Mention and/or description of a product or service herein
>> does not constitute endorsement thereof.
>>
>> Any code or pseudocode included in this post is offered "as is", with
>> no
>> guarantee as to suitability.
>>
>> You can thank the FTC of the USA for making this disclaimer
>> possible/necessary.
>>
>> "laeldo" laura.e.dodge@gmail.com wrote in message
>> news:788e67b4-f277-40a7-b7b0-5ab4bd2af8df@l6g2000vbo.googlegroups.com...-
>> Hi, I have a text control. People will be typing either words or
>> numbers into it. If they type 99 I want to skip down several
>> questions. Here's the condition for my macro:
>>
>> [Forms]![frmFB213]![FB215]=99
>>
>> The action is 'Go to control' and the control name points to question
>> FB229. I've put my macro in the AfterUpdate section, but nothing is
>> happening. I'm suspecting this is because the answer is free-text. All
>> my skip patterns based on combo boxes are working well. I've tried
>> putting single and double quotes around the 99, I've tried using the
>> "Like" feature with 99 in and not in quotes. Can anyone tell me what
>> I'm missing? Thanks so much!
>> -
>
> The aim is to fix problems and all concerns as to who makes the hardware
> or software. Expect more. IT support Los Angeles and small business
> consulting offers premier small business computer consulting and managed
> IT services paired with easy access to computer sales and order
> management via online computer stores and help centers.
>
> =====================
> *'Project Management Software' (http://www.project-drive.net/)*
>
>
>
>
> -- 
> sandypeter111 


0
Jeff
6/3/2010 4:13:48 PM
Nope, I was trying to imagine modifying the form every time I needed a new 
question.

Consider looking into the more normalized survey/questionnaire design 
offered by Duane H.:

     http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=3


Regards

Jeff Boyce
Microsoft Access MVP

-- 
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laeldo" <laura.e.dodge@gmail.com> wrote in message 
news:96937b8c-fdac-46d5-9e4c-1dd182d8393f@z33g2000vbb.googlegroups.com...
> Hi Jeff,
>
> The data type under the control is Text. This project is for data
> entry for a large questionnaire. So each question on the questionnaire
> has a control on the form for an answer. If I need to add questions it
> doesn't screw up the numbers because they are already assigned on the
> paper questionnaire. If I need space for another answer because the
> respondent checked two boxes instead of just one, the question becomes
> 210a, 210b, etc. Is that what you're asking? Thanks!
>
>
> 


0
Jeff
6/3/2010 4:15:33 PM
The design of my database aside, all I want to know is whether Access
can recognize a particular free-text response and act accordingly. Do
I need quotes, should I use the "Like" feature, etc?

0
laeldo
6/3/2010 6:12:21 PM
The design of my database aside, all I want to know is whether Access
can recognize a particular free-text response and act accordingly. Do
I need quotes, should I use the "Like" feature, etc?

0
laeldo
6/3/2010 6:12:30 PM
The design of your database isn't an "aside".

"How" depends on "what" ... and the "what" is the design of your database. 
It all starts with the data!

Regards

Jeff Boyce
Microsoft Access MVP

-- 
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"laeldo" <laura.e.dodge@gmail.com> wrote in message 
news:e55c318e-8225-41d5-9953-af65b7e034cb@y4g2000yqy.googlegroups.com...
> The design of my database aside, all I want to know is whether Access
> can recognize a particular free-text response and act accordingly. Do
> I need quotes, should I use the "Like" feature, etc?
> 


0
Jeff
6/3/2010 6:20:12 PM
Reply:

Similar Artilces:

Y axis box size incorrect in Excel 2003
I am having a problem; the y-axis box size does not display the entire text. I cannot change the size of this box. This only happens for the y-axis, not for other axis labels or the chart title. I have tried adding spaces followed by a period to fool the box and this works in Excel, but when I copy the chart to a Word document, the full text, including the final period appears. Hi, Details and suggestions can be found on Jon's page. http://peltiertech.com/Excel/ChartsHowTo/AxisLabelCutOff.html Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "lcare...

How to catch a WM_COPY message in a CRichEditCtrl based object
I have a CRichEditCtrl based class, and I want to catch the WM_COPY message. I used the ON_MESSAGE(WM_COPY, OnCopy) macro in the MESSAGE_MAP, and then defined a LRESULT OnCopy(WPARAM, LPARAM); function. However I am not getting a breakpoint in that routine. Do I need to be using Reflection? Any ideas on how I can catch that message so I can do special processing? Thanks! Under what conditions are you not catching WM_COPY? Ctrl+C? It probably doesn't send a WM_COPY message (Microsoft is not very good about doing things the right way, just doing things the clever way) joe On 3 Ja...

Automatically finishes entering email into TO box
How do I tell MS Outlook to automatically finish entering into the TO box (sending email)when I begin typing the person to whom I am sending mail? thanks! What version of Outlook? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the SWEN virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Gem asked: | How do I tell MS Outlook to automatically finish entering | into the TO box (sending email)when I begin typing the | person to whom I am sending mail? | t...

Run a query based on user input to a text box
I am creating a database to manage Auction Bids for a live radio station phone auction weekend. I have a form where the user is entering names as the bidders call in. I want to be able to have entry into a text box cause a query to run and populate a list box so that if a caller has been entered before, the user can click on an existing name. So for example, if the first keystroke is A , then the list box will be populated with all names beginning with A. If the next keystroke is l to give Al then the list box will be repopulated with only names beginning with Al (e.g. Alice, Aliso...

Two message boxes
I have two message boxes that fire off when I am going to print a report to determine what will show up on the report as far as fields. The first message box is to hide the customer price on a quote, if you answer yes it sets a checkbox on the initial form to true. The next message box is to show or hide the changes made to the quote on the report. If I say vbyes to both of the message boxes the customer pricing will not be hidden as the checkbox is getting set back to false. I am not sure why it is toggling, but it works if I answer yes to the first and no to hte second. It may ...

Some media files skip my Video DSP plugin
I created my video dsp plugin by visual studio 2005 and MS SDK 6.1. For more codec support I also installed K-Lite codec pack. The plugin worked fine for media files encoded in divx/xvid, but when playing WMVs, WMP didn't call any of my plugin functions. I tried to create another plugin in dual mode but result was the same. Please help... Thanks. On Wed, 24 Feb 2010 23:40:01 -0800, CCLin <CCLin@discussions.microsoft.com> wrote: > >I created my video dsp plugin by visual studio 2005 and MS SDK 6.1. >For more codec support I also installed K-Lite codec pack. >...

Text is added as attachment after copy and paste
Hi I am using outlook 2000 and every time I want to copy and paste text from somewhere else (e.g. browser), it adds the content as an html-page-attachment to my new mail. I just want to have it added as simple text in the mail-body regards R. Save the text in notepad or something and then Insert the file - but check the button so it inserts it as text, not just as an attachment ;-) r@gnar.de wrote: > Hi > > I am using outlook 2000 and every time I want to copy and paste text > from somewhere else (e.g. browser), it adds the content as an > html-page-attachment to my new ...

populating an Access table from a text file
A text file has data in a format like the below: Title1 Cell 1 data Title 2 Cell 2 data Title 3 Cell 3 data .. .. .. Title 10 Cell 10 data Title 11 Cell 11 data .. .. .. Title 15 Cell 15 data .. .. .. Title N Cell N data I guess I can read this using some VBA code posted at http://www.mvps.org/access/modules/mdl0057.htm and http://www.granite.ab.ca/access/readtextfile.htm, add an Instr function to it so that when I read the text file, I know when to insert the data properly in the table. 1. Is there another way I can directly import the data into an Access 2...

Using excel as a data base
How to create names and addresses in EXCEL that can be used in a mail merge in Word One row per record. Each field in a separate cell/column. It's much easier to combine fields than it is to separate them correctly. You may want to read some tips for mailmerge: http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge The first is from David McRitchie and the second is by Beth Melton and Dave Rado. Nan wrote: > > How to create names and addresses in EXCEL that can be used in a mail merge > in Word -- Dave Peterson ...

matching identical values.
I am using the following formula to return values when a cell is equal to that on a worksheet. First of all i use the countIF scenario to count all the items that are identical. Then an address to work out the position and finally match to find the relevant data which is on the same line. my problem is that when it finds the first set of data it returns this and the following number of rows that match the count instead of the first set of data, the second set and so on. can anyone help please? (worksheet2 formula used to match data from worksheet 1.) =COUNTIF(worksheet1!B:B,A1) 1st line...

set a default value for a cell ?
I want to set a default value to a cell or set of cells which might be edited by the user? I have a column which is used by a person to enter values. But A default value should appear. Could you please help me? see help on data validation or debra degliesh's page http://www.contextures.com/tiptech.html "Jeethu" <Jeethu@discussions.microsoft.com> wrote in message news:5A34C3B6-EF14-40AB-9CC6-E590AED4B6D8@microsoft.com... >I want to set a default value to a cell or set of cells which might be >edited > by the user? > > I have a column which is used by...

Name Drop-Down Box
I've got a 50 sheet excel document and i want to create names to get m to A1 on every page, so I don't have to scroll left and right all th time. So, here's my problem. I would like to increase the number of names shown when i click th drop down box. Right now it shows 7, in Office 2003. I would love t increase that to show 50, or else I�m not really getting th functionality I�m looking for. I think this will take some kind of registry tweak. Does anyone know how/where I can? Thanks in advance, Chri -- cbh3571 ----------------------------------------------------------------...

help on combo box...
i have a combo box cbPayee... on top of the list is "add new payee..." below which are the other names ...how can i enable it that when the 1st row is selected, a pop-up form wud appear for data entry... thanks... -- ai® Message posted via http://www.accessmonster.com Use the After Update event of the combo. If Me.cbPayee = "add new payee..." Then 'Do it here Else However, a more common technique is to use the combo's NotInList event for this purpose. Set the combo's Limit To List property to Yes. Delete the "add new payee...&q...

Resizing "comments" boxes in a workbook all at once
I do not know how I did it but all my comments (about 200 of them) defaulted to a size that makes them almost invisible with only the tails showing. The only way I can resize them is by going into each one and change the shape. I gave up after about 50 and I am now desperate for the information contained in all comments boxes. Is there a way of making all the boxes the same size in one go? How did I manage to screw up and how do I avoid doing it again. Thanks Rita You could resize them programmatically. There's sample code here: http://www.contextures.com/xlcomments03.html#Re...

= Text formula problem
Hi Everyone, I am using an excel spreadsheet as a linked table in an access database for an update query. I had it working very nicely for a period of time. I am not sure if some Microsoft update caused a problem or what. The field I use t o update my database didn't work until I used this formula to make a new row. I have a column of numbers which was retrieved from a data miner program it's called Acct. For some reason Access doesn't like the formatting so I insert a blank column to the right and call that PtNum. In the first cell of this column which is C2, I type ...

Checking if values are between values
I'm having a little trouble getting a formula to work. All I need to d is use Countif to determine whether or not a value is within a certai range (1.0-1.9). The formula I've tried is: =countif(a1:a25,>1.0<1.9) I'm sure there's something wrong since it's not working, but hopefull someone can advise me on the correct syntax. This worksheet is being created with Excel 97 -- Message posted from http://www.ExcelForum.com One way: =SUMPRODUCT((A1:A25>1.0)*(A1:A25<1.9)) -- Best Regards Leo Heuser Followup to newsgroup only please. "guilbj2 >"...

Writing rules: Looking for text string in HTML Body
I am trying to fight SPAM by deleting messages that contain certain text strings in the body. It seems certain SPAM messages run in streaks and I can get hundreds of the same message but I am unable to block them with my SPAM software so I want to write a rule to delete them. Writing a "normal" rule and selecting: "with '<TARGET TEXT>' in the body" may not work on an HTML message if the sender has disguised that text as follows: Displayed text: a new home purchase HTML Code for same: a n<AJZDE>ew home purcha</LAHIOJ>se How can I fil...

How do I save Visio help text boxes as html
I have a Visio process flow containing help text boxes (mouse overs) and hyperlinks that I want to save as a web document (html). When saved, the help text boxes are no longer available. How do I save as html so that they are available? ...

Comment box defaults
Can I change the comment box default font and stop it inserting my name in each box? Peter delete user name from the tools > options > general > delete user name from the tools > options > general and replace with a space To change the default font size (Note: this will change the settings for tooltips in Excel and other programs) -- Right-click on the desktop, and choose Properties On the Appearance tab, click Advanced. From the Item dropdown, choose Tooltip Choose a font Size, click OK, click OK (Note: selecting a font type he...

Role-based authentication from active directory
Hello, I want certain pages of my website visible only to a particular role in the network (Active Directory) How do I check for authentication from active directory (role-based) Eg-- I want the only managers in the active directory to access a particular page. Please provide me some code by which I can achieve this. Thanks On Feb 15, 8:31=A0pm, "Biranchi Narayan Panda" <biranchi_pa...@hotmail.com> wrote: > Hello, > > I want certain pages of my website visible only to a particular role in t= he > network (Active Directory) > > H...

Changing field sze of labels and text boxes independently
I am using Access 2007. I created a report with the wizard. Now I can't change the size of labels or text boxes without all the fields/labels changing in concert. What do I do to permit changing these things individually? Must be simple, but the help function in Acess 2007 I find not very helpful. On the arrange tab, look for the button for Remove. Highlight the controls and click remove. This will ungroup the controls. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "gg" <gg@discussions.microsoft.com> wrote in message news:92DDB6...

how to set value of text bounded on combo box?
Hi, I have a combo box with row sours of a table, and there is a text box. What I want to do is once the user selects a value from the combo box, the text box should be filled by a specific data. For example, the combo box has list of names, and once the user select the name; the text box shows the phone number of the selected name automatically. Note: both the name and phone number are in the same table. How can I do that? Make sure that the query for the combobox returns both the name and phone number. The Phone number does not have to be visible in the combobox. In the combobox A...

Excel name boxes
How do I change or delete a name in an Excel name box? (A name box is the white rectangle in the upper left corner of an Excel page that shows the cell address, e.g. Q143. You can change the 'name' of the cell from the cell address to a description, e.g. Sales-Other and click it from a drop down menu at the name box instead of scrolling to it.) You're referring to a named range. On the main menu, click >Insert >Name >Define. The full population of named ranges will show in the drop down: you can edit, delete, expand etc from that list. To change or delete a name: ...

how do i show text in the data field of a pivot table?
If you put a text field into the data area of a pivot table, it will summarize the field to show a count, instead of showing the text. You can place the text fields in the Row, Column or Page areas, where their text will show. pum75 wrote: -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

convert month text (MAR) to month number (3)
I am trying to work with a data set that unfortunately has spit out all the dates in a text format - i.e. 03/01/2009 is MAR 3 2009. Is there a way to convert that text date to an actual date format? Any advice or suggestions are greatly appreciated. Thanks -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200912/1 Debug.Print CDate("MAR 3 2009") = 3/3/2009 One problem with the CDate function is that it will bomb out on things that can't be evaluated as a date. Therefore you may want to use the IsDate fun...