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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Info on converting Access 2003 Modules to VB.Net 2005 - DoCmd.OpenForm 2

Status
Not open for further replies.

surfside1

Programmer
Feb 12, 2006
209
US
I'm new to VB.NET Express 2005 and things as simple as I'd use in Access such as: DoCmd.OpenForm "frm_Listings", acNormal, "", "", acAdd, acNormal
I can't figure out what to use in VB. Does anyone know where documentation resides that I can find to help through the transition? I can't even find the equivalent of a DoCmd.Openform statement at all! I have a form that is used to view an existing record and also is used to add a new record. The Table is Access with an autonum key and the code is VB.NET Express 2005. Plus I know if I am stumped with that, there are so many more things that will hit me.

Truely appreciate any help!
 
Yep things will hit you as big as a bus. First of all try learning Object oriented concepts then try learning the correct syntax like

Code:
dim frm2 as new form2
frm2.show

this is what replaces docmd.openform "form2", acsingleview more or less

and then try this and be amazed

Code:
dim frm2 as new form2
frm2.show
frm2 = new form2
frm2.show


Christiaan Baes
Belgium

My Blog
"In a system where you can define a factor as part of a third factor, you need another layer to check the main layer in case the second layer is not the base unit." - jrbarnett
 
I can tell you have a good sense of humor - and I "do" need that right now! What I think confuses me most is that I'm not sure what words I need to change to fit my project's objects, such as form2? Does that need to be he name of my form such as My.Forms.frmAuctionListings?

And what would you recommend as far as OO concepts?

Thanks again!!
 
Sorry, my email was out of sync with your other replies, I'll study them, thanks again.
 
IMHO, I think the approach you should take is to first learn the foundamentals of the new language. Buy a good VB.NET book, and read through the chapters that apply to your project.

Secondly, I wouldn't try to do a line-by-line conversion of the code. Use the functionality of your Access app as a guidline as to how your new app should behave, but create entirely new code using OO principles in VB.NET. You may think it will take you longer, but once you start getting used to the .NET way I'm pretty sure it will take less time in the end.

 
Guess you can tell I'm from NC, USA.
Hope to have more questions I can bug you with, which I'm sure I will! Thanks again.
 
Thanks for all of your help. As far as the New Form, I am coding the following.

Private Sub toolstripListingForm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolstripListingForm.Click
Dim fListingEditForm As New frmListingEditForm
fListingEditForm.Show()
End Sub

It does open the form and the only field that is empty is the Table ID (which is Access - autonum). The other fields are populated with the 1st record's values for those fields.

Also, since the ID field is blank, will the table automatically number the next sequential number for that row when it is saved? And how do I save it in this syntax?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top