Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Radio buttons on forms

Status
Not open for further replies.

huwahut

Technical User
Mar 13, 2000
5
US
When I click on a radio button on a form, I need the 1st character of the<br>

name (in the text box next to the button) entered into an input field. Then<br>

I add 3 numbers and tab over to the next field. I.E., the button would be<br>

named
 
Here are the commands to do the items<br>
you need.<br>
<br>
Leftmost Character of something<br>
FirstChar= Left(me!Text1,1)<br>
<br>
Add something together<br>
MyNum = SomeValue + SomeOtherValue<br>
<br>
Put the cursor in a certain textbox<br>
me!Text12.setfocus <p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Judging by what I see here, I think a lot of that post was cut off. <br>
<br>
To continue:<br>
....would be named "BOH", and when I click on the radio button next to it (or the text that names the button), it will show a "B" in the input box near the radio button/id boxes. I then add 3 #'s and tab over to the next input field. The same would happen for each of the other radio buttons.<br>
<br>
<br>
Thanks for your instructions, but they are a bit cryptic. Just where do I enter this information?
 
Dang it. They've gone and changed specs on me. I now need to have an autonumber instead of entering one by hand. The other part I still need. i.e., a letter inserted into the (now) input box, followed by the autonumber
 
When I need to keep track of a number I use this:<br>
<br>
'open table and get the last RA number used<br>
Dim MyDB As Database, MySet As Recordset<br>
Set MyDB = DBEngine.Workspaces(0).Databases(0)<br>
Set MySet = MyDB.OpenRecordset(&quot;Last-RA-Number&quot;)<br>
MySet.MoveFirst<br>
MySet.Edit<br>
Temp1 = MySet.Fields(&quot;Last_RA_Number&quot;)<br>
Temp2 = Temp1 + 1<br>
MySet.Fields(&quot;Last_RA_Number&quot;) = Temp2<br>
MySet.Update<br>
MySet.Close<br>
MyDB.Close<br>
<br>
Then you can add a letter to the front of it either in this code or somewhere else.<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
ok, thanks.<br>
<br>
I'll figure out just what that all means at some point.....<br>
<br>
It's far more advanced in SQL than I am able to understand at this time.<br>
<br>
I'm working on it though ;0
 
See that's the beauty of using Windows and the Internet.<br>
You can copy and paste the code above an put it in your application.<br>
Then test it and learn from it.<br>
<br>
Get a Book on Programing VBA in Access.<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
In fact, I did just that. It didn't do anything whatsoever.<br>
I have a huge thick book on MS Access, and it really makes no mention of this type of thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top