473,327 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Trying to create an If steatement thet popoulates aa unbound text box in access form

i have created a If Statement that should update an unbound form with the information from another unbound form depending on what number is entered

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_AfterUpdate()
  2. If Me.Text6 = 2 Then
  3. Me.Text11 = "Me.SAPR"
  4. Else
  5. Me.Text11 = "Now()"
  6. End If
  7. End Sub
but when i enter the number the field remains blank

please help
Sep 9 '13 #1
3 1116
Seth Schrock
2,965 Expert 2GB
The first thing that I notice is that you have your code in the form's after update event. This won't trigger until you go to another record which can't happen in an unbound form. Try putting your code in the after update event of the control that you are updating.
Sep 9 '13 #2
zmbd
5,501 Expert Mod 4TB
second thing is that you have no reference to a different form for a value to return/set. You should also include code to check that the form is open or you will encountere another set of Grimlins.
Sep 9 '13 #3
Thanks Seth working now cant believe I missed that!!!
Sep 10 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Frances | last post by:
Hi All, * PREMISE * I'm creating an Access form with 150 items subdivided into 20 categories. Multiple categories (and items) can be selected so my user wants checkboxes. All of the options...
1
by: Jeff W. Hollister | last post by:
Howdy all, I have an unbound text box in a report with the following control source: = & " " & & " " & What I am trying to do is italicize the and parts but not the part.
2
by: Zlatko Matiæ | last post by:
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a...
1
by: coolminded | last post by:
i have 5 forms. how should i show each forms separetly. can i use the menu bar. how to create a menu bar in the access form. thanx in adv.
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
1
by: MyWaterloo | last post by:
I have an unbound text box on my main form that is used to show the sum totals in my sub form. I also have a field on my main form that has a control source in a table. This bound field needs to...
4
by: bkberg05 | last post by:
Hi I have a form called Customer whose record source is a table called Customer. The primary key is Customer_ID. On that form, there's a subform called sub_Customer_Contact_Log. It's record...
2
topher23
by: topher23 | last post by:
Disclaimer: I've already come up with a solution for this issue, but I thought I'd post it in the hope that it could help someone else and on the off chance that someone has another solution. I...
0
by: jbrumbau | last post by:
Hello, I would really like to know how to create fillable PDF files with an Access form. I know how to print a form and create a static PDF file but would like one that automatically converts...
2
by: Daryl Austin | last post by:
I am new to Access and need some help with creating calculated fields. I am trying to create a calculated sum field in a form, the sumfield would add the values of 5 fields in a table (all 5 fields...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.