Solved

SAVING DATA TO A VISUAL DATAMANAGER DATABASE

Posted on 2000-04-04
2
161 Views
Last Modified: 2010-05-02
I HAVE A DATABASE WITH THE FIELDS "SURNAME", "NUMBER",M AND "ID", AND WOULD LIKE TO KNOW THE CODE TO STORE A NUMBER TO A LOCATION RANGING FROM 1 - 10.

I.E.
TYPE IN A NUMBER INTO TEXT1.TEXT AND THEN PRESS A STORE BUTTON, THEN TO SELECT THE LOCATION, PRESS THE BUTTONS RANGING FROM 1 - 10

E.G.
TYPE IN A NUMBER, PRESS THE STORE BUTTON, AND THEN THE NUMBER 2 BUTTON, AND IT WILL BE STORED TO LOCATION 2 IN THE FASTDIAL DATABASE.


THEN BE ABLE TO RECALL THIS DATA IN THE SAME WAY AS A TELEPHONE FASTDIAL WORKS.

I.E.
PRESS A BUTTON RANGING FROM 1 - 10 AND IT RECALL THE NUMBER IN THAT LOCATION

E.G.
PRESS BUTTON 1 AND IT RECALLS LOCATION 1'S NUMBER AND NAME INTO THE DISPLAY. WITH SURNAME BEING DISPLAYED IN TEXT3.TEXT AND NUMBER IN TEXT4.TEXT
0
Comment
Question by:Warsteiner99
2 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 2683113
PLEASE DON'T SHOUT AT US!!!!!
0
 
LVL 1

Accepted Solution

by:
riduce earned 100 total points
ID: 2683163
dim fdNumber as String

Private Sub butStore_Click()
Data1.RecordSource = "select * from [FastDial] where [storenr] = '" & text1.text  & "'" & " order by [storenr]": _
      Data1.Refresh: _
Data1.Recordset.Edit
Data1.Recordset![storeNr] = Text1.Text
Data1.Recordset![Surename] = Text2.Text
Data1.Recordset![Number] = Text3.Text
Data1.UpdateRecord
End Sub

Private Sub butFastDial_Click(Index As Integer)
fdNumber = butFastDial(index).index
Data1.RecordSource = "select * from [FastDial] where [storenr] = '" & fdNumber  & "'" & " order by [field7], [field5]": _
      Data1.Refresh: _
text3.text = Data1.recordset![Surename]
text4.text = Data1.recordset![Number]
End Sub
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 82
bit defender blocks good applications 2 105
Help with retrieving partial value from a column using VB.NET 4 53
Child Form in front 4 56
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question