473,796 Members | 2,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating an Access 2000 form without Wizard - Code Only

38 New Member
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.Connectio n
Dim adoRecs As ADODB.Recordset
Set adoConn = New ADODB.Connectio n
Set adoRecs = New ADODB.Recordset

AdoConn.open “database”
Or
adoConn.Connect ionString = "Provider=Micro soft.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.OpenRecord set("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 2260
MMcCarthy
14,534 Recognized Expert Moderator MVP
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 Recognized Expert Specialist
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.Connectio n
Dim adoRecs As ADODB.Recordset
Set adoConn = New ADODB.Connectio n
Set adoRecs = New ADODB.Recordset

AdoConn.open “database”
Or
adoConn.Connect ionString = "Provider=Micro soft.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.OpenRecord set("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.Connectio n using CurrentProject. Connection property.
Jun 16 '07 #3
emajka21
38 New Member
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
4647
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 4 to Service Pack 7 2) Set Subdatasheet Name to from 3) Shortened the file name of the .MDB file 4) Made sure the Track name AutoCorrect info is off
0
1721
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 correctly on a windows 2000 SP3 pc? I have had to reinstall following a system crash and the thing just won't play ball. This is what I'm currently doing;
6
4759
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 appreciated. Thanks in advance
4
4740
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 athletes.  I have now learned how to join two different tables in a query so that I might generate a report. Specifically, student athletes at a community college are required to graduate with an AA or AS degree.  Consequently, various steps are in...
2
2035
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. I've set the Record Source to both the query, and the SQL contained within the query, and although the system pauses long enough to have gone out and retrieved the data, I can't see it. The form itself remains gray. In addition: ...
4
4404
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 an Access 2002 database. The problem: when installing on a Windows XP machine, I get the following error: The Office System Pack cannot be installed on this system because it
6
2348
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 of other offices and the instructions i'm going to have to pass along with them are SIMPLE. most people who are the end users of this db are not computer saavy to say the least. what i have now is a command button that says 'press for help' and...
24
15753
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 scenario, quite amusing, and I'll try to sum this up quickly:-) At home, when the command button wizard (Access 2000) loads and give me some wonderful options/selection tips, the result, code is pre-written for the button when completed. I...
4
6709
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 you for your Feedback" for 5 second and then goes back to the home page... Below is the code for the feedback.php <?php /* CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.08 Generated by thesitewizard.com's Feedback Form Wizard. ...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10456
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10230
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10174
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9052
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.