Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting text in textbox based on info from another tab
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01096900
Message ID:
01097163
Views:
19
Still not sure but could it be:
strSQL = "UPDATE AliasA " & _
   "SET AliasAadodc.address = " & YourTextBoxThatContainsAliasBadodc.address.text & _
   " FROM Table1 AS AliasAadodc " & _
   "INNER Join Table2 AS AliasBadodc " & _
   "on AliasAadodc.phone = " & YourTextBoxThatContainsAliasBadodc.phone.text 
>Sorry I didn't explain exactly what I wanted. I think I'm going about this the wrong way because what I was asking earlier is really a doing things the hard way. I guess what I want to happen is for the address information to be inserted autimatically into the text box (after it finds the same phone number exists for both tables after losing focus on the phone field) but since the form is using an recordset for the tables the data really won't be sent to the table until it is saved by the user clicking the save button. (MyTableadodc.Recordset.Update) So I would want the address information to be retrieved and placed in a text box but if the user cancels the recordset (or closes the form) then no information is sent to the table.
>
>So like your example but just putting the address in the text box
>
>UPDATE AliasA
>SET AliasAadodc.address = AliasBadodc.address.text
>FROM Table1 AS AliasAadodc
>INNER Join Table2 AS AliasBadodc
>on AliasAadodc.phone = AliasBadodc.phone.text
>
>
>Is this correct or completely wrong?
>Thank you again and I apologise for all the questions!
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform