By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,762 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,762 IT Pros & Developers. It's quick & easy.

2 textfields as 1 record

P: 19
Hi there,

I have a question about forms in MS Access..

Is it possible in any way at all, to add info in 2 textfields and save it as 1 record.

Detail:

I have a record with 3 fields. "Patchnummer" "Patchkast" and "Ruimte"

"Patchnummer" (XX-0) XX stands for A-Z and 0 stands for 1-24
"Patchkast" (XX0) XX stands for A-Z and 0 stands for 1-24

Now I want those 2 fields combined as 1. So that the total outcome would be something like XX0 XX-0

If there is any more info needed please ask, because I can't find any information about it myself..

Thanks
Jan 7 '08 #1
Share this Question
Share on Google+
2 Replies


ADezii
Expert 5K+
P: 8,636
Hi there,

I have a question about forms in MS Access..

Is it possible in any way at all, to add info in 2 textfields and save it as 1 record.

Detail:

I have a record with 3 fields. "Patchnummer" "Patchkast" and "Ruimte"

"Patchnummer" (XX-0) XX stands for A-Z and 0 stands for 1-24
"Patchkast" (XX0) XX stands for A-Z and 0 stands for 1-24

Now I want those 2 fields combined as 1. So that the total outcome would be something like XX0 XX-0

If there is any more info needed please ask, because I can't find any information about it myself..

Thanks
In the AfterUpdate() Event of PatchNumber and PatchKast, place similar code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub PatchNumber_AfterUpdate()
  2. If Not IsNull(Me![PatchNumber]) And Not IsNull(Me![PatchKast]) Then
  3.   Me![Ruimte] = Me![PatchNumber] & " " & Me![PatchKast]
  4. Else
  5.   Me![Ruimte] = ""
  6. End If
  7. End Sub
Jan 7 '08 #2

NeoPa
Expert Mod 15k+
P: 31,489
The normalised way of handling this would be not to store it at all but to show the calculated result any time it's required. The only exception that springs easily to mind is when using the resultant field in an index.
Jan 7 '08 #3

Post your reply

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