473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating an Access 2000 form without Wizard - Code Only

Hello, and thank you in advance for trying to help me. I am trying to create an access 2000 form without using the wizard. It just doesn't seem like I can the level of complexity I want out of the wizard so I want to hand code the form. If this was any other language accessing an access form I know how to do it but I am not sure how to access the tables WITHIN the access database itself.

Here is what I would like the form to do.
On Load:
Textbox1 - I want it to Select Year(field) From Year-Race (table)
Combobox1 - I want to Select Runnerid, LastName From Runner

After Load:
Textbox2 - I want to be able to enter a number
They also select the runners lastname/id
Year they can't change


I then have a button to save.

When this gets saved it needs to save these 3 pieces of info into a table called Race-Bib. There are only the 3 fields in this table (year, bibNum, runnerID)

I understand how to do SQL statements. The problem is connectivity. If this was any other language I would do something like:

Dim adoConn As ADODB.Connection
Dim adoRecs As ADODB.Recordset
Set adoConn = New ADODB.Connection
Set adoRecs = New ADODB.Recordset

AdoConn.open “database”
Or
adoConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source ='" & App.Path & "mydatabase.mdb'"


But since the database is already "open" because I am in it how to I reference my tables?

I have seen many examples that show to do the following (below) but when I try to run it doesn't like it. My only option appears to be adodb.whatever
Dim MyDB As DAO.Database, MyRS As DAO.Recordset

Set MyDB = CurrentDb()
Set MyRS = MyDB.OpenRecordset("Mainframe Report List", dbOpenDynaset)

Is this not an option because I am still using Access 2000? I do have access 2003 available if that would be better.

I have programmed in numerous languages but programming within access just doesn't make sense to me.

To reiterate:
Tables:
Runner - Runnerid, FirstName, LastName, address...ect
Year-Race - Year, RaceNum
Race-Bib - Year, RunnerID, bibNum

Just to let you know bibNumbers change every year so to be able to keep track of historical data I am using the year/BibNum/Runnerid as a key in another table (Race Times)

I hope this is making some sense. Any help is greatly appreciated.
Jun 14 '07 #1
3 2237
MMcCarthy
14,534 Expert Mod 8TB
I'm a little confused about exactly what you are trying to do.

Have a look at the DLookup function. I think its more suitable for what you want.
Jun 16 '07 #2
FishVal
2,653 Expert 2GB
I understand how to do SQL statements. The problem is connectivity. If this was any other language I would do something like:

Dim adoConn As ADODB.Connection
Dim adoRecs As ADODB.Recordset
Set adoConn = New ADODB.Connection
Set adoRecs = New ADODB.Recordset

AdoConn.open “database”
Or
adoConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source ='" & App.Path & "mydatabase.mdb'"


But since the database is already "open" because I am in it how to I reference my tables?

I have seen many examples that show to do the following (below) but when I try to run it doesn't like it. My only option appears to be adodb.whatever
Dim MyDB As DAO.Database, MyRS As DAO.Recordset

Set MyDB = CurrentDb()
Set MyRS = MyDB.OpenRecordset("Mainframe Report List", dbOpenDynaset)

Is this not an option because I am still using Access 2000? I do have access 2003 available if that would be better.

You can retrieve ADODB.Connection using CurrentProject.Connection property.
Jun 16 '07 #3
I appreciate you answering me but I have given up on trying to use access. I have switched my project to C#/ASP as I am more familar with that language. Granted even that is being stubborn...
Jun 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: John | last post by:
Hi, I've recently upgraded from Access 97 to Access 2002 & the performance basically stinks. I have tried the following items listed below but it has only had a minor impact: 1) Upgraded Jet...
0
by: Deano | last post by:
I know this is a long, long shot since I've never seen anyone else confess to owning this software but..... Does anyone know what the correct sequence is to get the MSI wizard functioning...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
4
by: Sami | last post by:
I hope someone will tell me how to do this without having to do any VB as I know nothing in that area. I am a rank beginner in using Access. I have created a database consisting of student...
2
by: David C. Barber | last post by:
upsized an MDB to ADP/SQL Server 2000 under Access 2000. All the DAO code that I've changed to ADO code is working fine, HOWEVER the form Record Source itself does not seem willing to return data....
4
by: Aliza Klein | last post by:
Apologies in advance as I am SURE this has been asked 100 times - but I haven't got a simple answer: I have MS Office XP Developer and have created an installation package (with the runtime) for...
6
by: kaosyeti | last post by:
is there a way to create simple help file that i plan on linking to a command button on a form using what's already in access? i will probably be giving out this db that i've written to a number...
24
Dököll
by: Dököll | last post by:
Jumped for joy last night after learning, indeed, the command button wizard can be switched on or off. Well this occured here, with my Access 2000...an attempt to redo at work failed. Here's the...
4
by: atiq | last post by:
I basically have a mail to form on my website. When the form is filled and submitted by the user it processes the form using the file feedback.php. What i want is a Pop up window which says "thank...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.