Hey Group,
Hows you all doing?
Im after a bit of advice, if you don`t mind?
1) How i setup some Validation checking? ie - check to make sure all my
textbox`s have been selected and that certain comboboxs have been selected,
and if not through a message saying "You have not filled out - Username,
Password, ADRCode" etc etc> If you get what i mean?
2) Could Somebody please point me in the right direction of a how to for
creating some Repair and compact code for a Access DB?
3) When My App Starts I would like the User to be able to select from a
local DB or a Network DB via a combobox. I`ve got my App to right the DB
paths to the Registary. Only problem is I have around 20 Database
Connections on my App now, how do i set it up to always look for the one
thats been selected?
Any Links or any advise would be much appriciated.
Many Thanks
Regards
MCN 3 994
Hi Simon,
Some answers, 1) How i setup some Validation checking? ie - check to make sure all my textbox`s have been selected and that certain comboboxs have been
selected, and if not through a message saying "You have not filled out - Username, Password, ADRCode" etc etc> If you get what i mean?
This I would just do in the event that starts the routine that is needed,
mostly a button click and use a errorprovider something as typed here watch
errors
\\\\
dim testcombobox(2) as combobox = New combobox() {Combobox1, Combobox2}
dim i as integer
for i = 0 to 1
if mycombobox1(2).selectedindex = -1
ErrorProvider1.SetError(testcombobox(i), "Needs to be selected.")
exit for
end if
next
////
2) Could Somebody please point me in the right direction of a how to for creating some Repair and compact code for a Access DB?
http://support.microsoft.com/default...b;en-us;306287
3) When My App Starts I would like the User to be able to select from a local DB or a Network DB via a combobox. I`ve got my App to right the DB paths to the Registary. Only problem is I have around 20 Database Connections on my App now, how do i set it up to always look for the one thats been selected?
Just add it in the load event of your application
(I had a long time finding this, however just)
OleDBconnectionX = new OleDBconnection(and than the connectionstring)
I hope this helps?
Cor
Cor,
Going on the Multiple Database connections? Im a little confused Sorry:(
I`ve added 3 Reg Keys:
TestDB, LiveDB, and LocalDB
I`ve created a ComboBox with TestDB, LiveDB, and LocalDB, how would i get it
so when the user selects on from the ComboBox my project always uses the one
selected?
Many Thanks
MCN
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi Simon,
Some answers, 1) How i setup some Validation checking? ie - check to make sure all my textbox`s have been selected and that certain comboboxs have been selected, and if not through a message saying "You have not filled out - Username, Password, ADRCode" etc etc> If you get what i mean?
This I would just do in the event that starts the routine that is needed, mostly a button click and use a errorprovider something as typed here
watch errors
\\\\ dim testcombobox(2) as combobox = New combobox() {Combobox1, Combobox2} dim i as integer for i = 0 to 1 if mycombobox1(2).selectedindex = -1 ErrorProvider1.SetError(testcombobox(i), "Needs to be selected.") exit for end if next ////
2) Could Somebody please point me in the right direction of a how to for creating some Repair and compact code for a Access DB?
http://support.microsoft.com/default...b;en-us;306287
3) When My App Starts I would like the User to be able to select from a local DB or a Network DB via a combobox. I`ve got my App to right the DB paths to the Registary. Only problem is I have around 20 Database Connections on my App now, how do i set it up to always look for the one thats been selected?
Just add it in the load event of your application (I had a long time finding this, however just) OleDBconnectionX = new OleDBconnection(and than the connectionstring)
I hope this helps?
Cor
Hi Simon,
I would make in the load event from your first form a showdialog form as you
did already
That form let say form3 has a public property or field, connString and a
combobox.
When that combobox is selected you close that form.
The code on form1 on the load event can than be
dim frm3 as new form3
if frm3.showdialog = message.Ok then ' this comes automaticly so I always
forget
YourOleDbConnection = new OleDbConnection(frm3.connString)
end if
frm3.dispose
I think this would do it.
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Spammay Blockay |
last post by:
I've been tasked with doing technical interviews at my company,
and I have generally ask a range of OO, Java, and "good programming
technique" concepts.
However, one of my favorite exercises I...
|
by: Brian Patterson |
last post by:
I have noticed in the book of words that hasattr works by calling getattr
and raising an exception if no such attribute exists. If I need the value
in any case, am I better off using getattr...
|
by: Mike |
last post by:
Hello,
I have a few rather urgent questions that I hope someone can help with (I
need to figure this out prior to a meeting tomorrow.) First, a bit of
background: The company I work for is...
|
by: Rob Cheshire |
last post by:
Hi to all,
I need some help deciding on the best database system for our
specific application.
OPTIONAL INFO: We currently have 2 separate projects that need to be
updated from dos-based dBase. ...
|
by: Matt |
last post by:
I have 2 questions:
1. strlen returns an unsigned (size_t) quantity. Why is an unsigned
value more approprate than a signed value? Why is unsighned value less
appropriate?
2. Would there...
|
by: S.Tobias |
last post by:
In the past weeks I asked two questions concerning unions,
and I got not a single reply to either. What should
I do next? Re-post them? Ask them again in csc?
--
Stan Tobias
sed 's///g' to...
|
by: glitter boy |
last post by:
Ok so I have this class for C. I have to write this program for my
instructor, where he has already posted the softcopy and algorithm. But
my question is I have to convert meters to feet and in...
|
by: Hareth |
last post by:
C# 2005 express & vb 2005 express:
1. During runtime, I can edit my codes in C#..... How come this cannot be
done in VB? it says ...."read-only" during runtime......
2. Why does vb...
|
by: dreamznatcher |
last post by:
Hello,
I'm considering a career switch to a more database-related job, but
need help on a few questions and issues. I'm a Computer Engineering
graduate and have always felt most comfortable...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
| |