Rene Schmitt
Jun 24th, 1999, 01:20 PM
Dear Sir,
I started learning VB only twelve months ago and although I find it fascinating, I must agree that I am still very green to visual programming. Everything that I know now has been self taught, using books and tips from the internet. I have created a few (very simple) applications which I am very proud of.
I am now working on a project where I need a little help from experienced VB programmers like you.
In order to keep in touch with relatives and friends, I have created a simple database in MS Access where I store, in a table their Surnames, First Names, Addresses, Phone Numbers etc
I have also created a query and form from that table, where I inserted in the “Surname” column/criteria the following message: [Please Enter Surname]. When I run the form, an input box appears, and prompts me to enter a surname. After entering a surname eg Smith, (as you guessed it) the first record with the name Smith appears on the form and gives me all relevant details about the record. This works fine.
I have created a new project in VB based on the above mentioned database and when I run the application, the form that is loaded always shows the first record on the database. As it is not possible to include queries from Access where a criteria exists, or include a form created in Access in a VB project, I would like to know, How to write a code that will prompt me (through an input box) to enter a “Surname”, in order to retrieve the first record in the DB with the Surname entered in the Input Box.
Your help will be greatly appreciated
Regards
Rene Schmitt
I started learning VB only twelve months ago and although I find it fascinating, I must agree that I am still very green to visual programming. Everything that I know now has been self taught, using books and tips from the internet. I have created a few (very simple) applications which I am very proud of.
I am now working on a project where I need a little help from experienced VB programmers like you.
In order to keep in touch with relatives and friends, I have created a simple database in MS Access where I store, in a table their Surnames, First Names, Addresses, Phone Numbers etc
I have also created a query and form from that table, where I inserted in the “Surname” column/criteria the following message: [Please Enter Surname]. When I run the form, an input box appears, and prompts me to enter a surname. After entering a surname eg Smith, (as you guessed it) the first record with the name Smith appears on the form and gives me all relevant details about the record. This works fine.
I have created a new project in VB based on the above mentioned database and when I run the application, the form that is loaded always shows the first record on the database. As it is not possible to include queries from Access where a criteria exists, or include a form created in Access in a VB project, I would like to know, How to write a code that will prompt me (through an input box) to enter a “Surname”, in order to retrieve the first record in the DB with the Surname entered in the Input Box.
Your help will be greatly appreciated
Regards
Rene Schmitt