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

Generating Fields

6
Dear Friends

I want to creat more than one field in table on one event.
example:

staring mobile no: 07783457001
end mobile no: 07783457050

if enter starting and end mobile numbers in text box and click save button. database shuld create fields between 07783457001 and 07783457050 and save mobile numbers in table field. pls help how can I program this in MS Access or MS SQL.

Note: 07783457001 increment to 07783457050

Thanks
Sep 1 '07 #1
10 1345
missinglinq
3,532 Expert 2GB
Are these "numbers" always going to start with a zero?

Welcome to TheScripts!

Linq ;0)>
Sep 1 '07 #2
MRuzly
6
Are these "numbers" always going to start with a zero?

Welcome to TheScripts!

Linq ;0)>
No it can start with 2nd digit
Sep 2 '07 #3
FishVal
2,653 Expert 2GB
No it can start with 2nd digit
Hi, MRuzly.

2 additional questions.
  • is this a telephone number with 11-digits always ?
  • what type of the table field where you store this numbers? I guess it is (or at least should be) Text type, but I want you to clarify this important detail.

Regards,

Fish
Sep 2 '07 #4
missinglinq
3,532 Expert 2GB
With fields called StartMN and EndMN and a command button called GenerateMobileNumbers, this code will generate the required records with mobile numbers filled out to 11 digits. If you need something else let us know!
Expand|Select|Wrap|Line Numbers
  1. Private Sub GenerateMobileNumbers_Click()
  2. Dim mn As Long
  3. Dim Rec As Double
  4. Rec = (EndMN - StartMN) + 1
  5.  
  6. For mn = 1 To CInt(Rec)
  7.  DoCmd.GoToRecord , , acNewRec
  8.  Me.MobileNumber = Format(mn + (StartMN - 1), "00000000000")
  9. Next mn
  10. End Sub
  11.  
Linq ;0)>
Sep 2 '07 #5
missinglinq
3,532 Expert 2GB
Your duplicate posting of this question/problem has been deleted! Please refrain from this prohibited behavior in the future! Your original post was responded to in approximately two hours!

From FAQs

Do Not Double Post Your Questions

Double posting is where you start a thread on a topic and then for some reason start another thread on exactly the same topic in the same forum. Please do not do this because

1. It makes it very hard for people to answer you especially if there are answers happening in all the threads you have started because they have to read 2 or more threads in order to see what has already been said.
2. It swamps the forum with your problem resulting in less attention for the other threads.

If you feel for some reason that you post has been overlooked (for instance it hasn't had any replies) please do not repost the question. Post a message to the thread you started, this will bump it back to the top of the thread list for the forum.


Thank you for your attention in this matter.


Linq ;0)>
Sep 2 '07 #6
MRuzly
6
Hi, MRuzly.

2 additional questions.
  • is this a telephone number with 11-digits always ?
  • what type of the table field where you store this numbers? I guess it is (or at least should be) Text type, but I want you to clarify this important detail.

Regards,

Fish
- yes, the telephone number with 11-digits oftern
- Numeric Type Field
Sep 2 '07 #7
missinglinq
3,532 Expert 2GB
The code I posted should work fine then!

Good Luck!

Linq ;0)>
Sep 2 '07 #8
MRuzly
6
The code I posted should work fine then!

Good Luck!

Linq ;0)>
When I compile the code following Error msg displaying

Method or Data Member not found!


and highligting following line in code.

Me.MobileNumber = Format(mn + (StartMN - 1), "00000000000")

please help me to void this Error
Sep 2 '07 #9
missinglinq
3,532 Expert 2GB
My guess would be that you need to replace MobileNumber with the actual name of the field on your form that holds the mobile number! When people post code here, they have to make up control names in order to display the code. You have to replace the names of controls in the code with your actual control names.

Linq ;0)>
Sep 2 '07 #10
MRuzly
6
My guess would be that you need to replace MobileNumber with the actual name of the field on your form that holds the mobile number! When people post code here, they have to make up control names in order to display the code. You have to replace the names of controls in the code with your actual control names.

Linq ;0)>
I kindly thank you for your help. the program is working successfully

Good Luck!
Sep 3 '07 #11

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

Similar topics

17
by: flupke | last post by:
Hi, i create my GUIs mainly via wxGlade. However when you start of to program and want to do some rearranging to the gui, wxglade overwrites your file and you've got to put your own code back...
4
by: Justin Lebar | last post by:
Sorry about the huge post, but I think this is the amount of information necessary for someone to help me with a good answer. I'm writing a statistical analysis program in ASP.net and MSSQL7 that...
5
by: Jon Sequeira | last post by:
Does anyone know of a component or class that available for generating updategrams from custom business objects? Ideally I need something that parses a mapping schema, interrogates an object, and...
1
by: PerryC | last post by:
Experts, I encountered an "Type Mismatch" error when trying to run the following codes... What I wanted to do was to have the codes generate a 2 weeks schedule with just populating the date fields...
6
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to...
0
by: Kenneth Allen | last post by:
I am attempting to port some code from an old C program into C#, and I have run into a roadblock with generating a checksum for each of the structures, and where the checksum is the last field in...
7
by: Venus | last post by:
Hello, I am trying to generate a dynamic form at runtime and would like to do it using "<asp: ..." form elements as follows Build up the string that is placed somewhere in the HTML code the...
18
by: Grant Edwards | last post by:
Could whoever is responsible for the gateway that is grabbing my postings off of Usenet and e-mailing them out please fix the headers in the mail messages so that I don't get the bounce messages?...
0
by: Minckeleers | last post by:
hello everyone, I'm pretty new in VB, moderate experience in Acces but I need to get a 'universal' code for generating reports from a table or query. It has to automatically create a report...
1
by: Lelu | last post by:
Hi, My HTML form is generating some blank email responses; does anyone see anything wrong with the scripts?: function isFormVarExcluded(thisForm, strToCheck) { var strExcludeVars =...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.