Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Front End for Access 2000 database

Status
Not open for further replies.

NickyJay

Programmer
Sep 1, 2003
217
0
0
GB
Hi - Can anyone help?!

I've created a relational database using Access 2000 and need to be able to create a front end for user input via VB.Net,...
However, I'm not sure where to start! I've set up the connection (after some difficulty!) between VB and the database in question, but am having trouble adding the table fields onto my form.

I've browsed various sites on the internet, with no luck, so I would be greatful for any pointers.

Thanks

[hairpull2]
 
1. create new windows projec
2. view--> server exploer --> data connection --> right click ---> add new connection
3. following wizard to created connection and from there to create dataset, datareader...
here is my connection string for you. NorthWind.mdb is in c:
Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=C:\Northwind.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False

you can get it form connection property
 
if you have the connection you need to create a dataadapter and then create a dataset to go with it. after that you place your textboxes on the fields and go to the propertie databinding then look for the text propertie in the databinding propertie and cchoose the field from the dropdownlist) you want it to use. But if you want full control you will have to look how it works via code and not use the wizards. they are fine up to a point.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Thanks for this guys . . .


I've now got the connection to the database sorted and the form pulls out records, but im having problems setting up nav buttons to scroll through the records.

Here's my code:

Private Sub btnPrev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrev.Click
Me.BindingContext(DsInfo1, "CompanyInfotbl").Position = -1
ShowPosition()
End Sub

Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
Me.BindingContext(DsInfo1, "CompanyInfotbl").Position = +1
ShowPosition()
End Sub

there are no error messages or any indication that anything is happening when either button is pressed!

[Smile2}
 
Wouldn't you need something like:

Private Sub btnPre_Click(ByVal senderAs System.Object,ByVal e as System.EventArgs) Handles btnPrev.Click
Me.BindingContext(DsInfo1, "CompanyInfotbl".Position = Me.BindingContext(DsInfo1, "CompanyInfotbl").Position - 1
ShowPosition()
End Sub

Similar for the Next button? Plus, I'd think you would check for the min/max values as appropriate.
 
Try setting up a dataset, a datview and use the currency manager.

then do something like the following:


Set our currencymanager object to the dataview object
objCurrencyManager = CType(Me.BindingContext(objDataView), CurrencyManager)

Then in the click event for your next, previous and other nav buttons do:
objCurrencyManager.Position += 1 (this is for the next button)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top