Input Box Value to Populate Text box

commandolomo

Registered User.
Local time
Today, 21:13
Joined
Jun 11, 2004
Messages
73
Hello everyone

Simple question, I hope! I have an input box that appears 'afterupdate' on a field, and I want to instruct Access to return the inputbox value to another field within the same form.

eg Afterupdate of 'Date', inputbox appears and instructs the user to type in a Name, which once OK is pressed, returns the inputbox value to the 'Name' field.

I have searched the forum, and found a thread regarding to inputboxes and default dates, but whilst I have some knowledge of basic vb writing, I could not work out what I should be using.

Any ideas?

Cheers

PJL
 
Firstly its not a good idea to name fields "Date" and "Name" as these are reserved words Access uses.

Presumably you have some code to bring up the InputBox. If you assign it to a variable then you can transfer what is entered to the appropriate field.

Code:
Dim str as String

str = InputBox("Enter Something")

Me.ReceivingFieldName = str

Col
 
Col

Many thanks for your reply.

I just exampled 'Name' and 'Date' for the purposes of ease of understanding for this thread - my real field names are much more obscure!!!

Cheers for the help, is now sorted :D

PJL
 

Users who are viewing this thread

Back
Top Bottom