473,320 Members | 1,856 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,320 software developers and data experts.

Use input to one field in a form to populate another field on the form

I have an Access database that has been developed using only the native Access tools and a few macros. I have found the need to use one of the controls on a form (contains a date field from one of the tables populated by user entry) to populate another control (another date field in the same table) based on what is contained in another populated field on the form. It appears the only way to do it is via VBA and I can't figure out how to get the data from and to the form. The basic code is being called in an event when the user tabs off of an input field (lost focus)

Private Sub DiscipleEnd_Chk()
If Me.DiscipleStart Is Not Null AND Me. Controls!DiscipleEnd Is Null Then
Me.Controls!DiscipleEnd = Me.Controls!ExitDate
End If
End Sub

Obviously don't have any idea what I am doing here and while it seems simple, basic programming logic is not sinking in no matter how many sites I look at for examples. Any help would be appreciated
Apr 30 '10 #1
1 1278
kadghar
1,295 Expert 1GB
the ME statement makes reference to the active form itself. so, if you want something from your current form to lets say Form1, :

Form1.Controls!DiscipleEnd = Me.Controls!ExitDate

HTH
May 1 '10 #2

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

Similar topics

0
by: Petre Agenbag | last post by:
Hi List Me again. I'm trying to return from multiple tables, the records that have field "information_sent" between two dates. The tables are all related by means of the id of the entry in the...
5
by: Pratik | last post by:
what are callback functions? Where we require callback functions? In what scenario we require callback functions?
14
by: Bob | last post by:
I have a function that takes in a list of IDs (hundreds) as input parameter and needs to pass the data to another step as a comma delimited string. The source can easily create this list of IDs in...
5
by: Earl Teigrob | last post by:
I am creating an application where I would like to give web designers the ablity to create a static html page and dyanamically load it into my application(exactly like loading a user control into a...
2
by: mikepolitowski | last post by:
Hi folks, I am have been trying to solve this problem for quite some time now and would appreciate any advice. I have been trying to call a code-behind function that is defined in my aspx.cs...
10
by: BevG | last post by:
I would like to test a condition (using "if") on each recurrence of a while loop, but once the condition has been fulfilled the first time, it is bypassed for the rest of the while loop. eg. ...
5
by: jim | last post by:
Hi, I've browsed several posts, but still haven't found the answer I'm looking for. I have one table (A) that contains a list of values I want to return. I have two other tables (B) and (C)...
3
by: buterfly0707 | last post by:
hi.. i have 3 tables. and the field discription is in Accounts table Account. and GL table fields are Debit, Credit and Period. And in Period Table Period and Date. this are nt only fields in this...
4
by: JB Private | last post by:
I need some help trying to figure out how to retrieve data from 3 different tables, when there are records in 1 table that don't exists in the other tables. Here's the situation Table1 Fields:...
8
by: Runtheball | last post by:
As a PHP learning exercise, I'm trying to program a "star trek" game. The game allows a list of commands, which are executed through a switch statement. The command below (case 8) is to 'scan an...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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

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.