f



MS Access Question for Access Gurus

I have one table called Album
another table called Song

One Album has many songs

I created an Album form that contains a Song Subform.

in the Song table I have a field id which is the primary key, and 
another field called index

The song index is a number that represents the song number on the record.

For example on the Beatle's Album: Abbey Road the song indices are as 
follows:

Track Listings
1. Come Together 	  	
2. Something 	  	
3. Maxwell's Silver Hammer 	  	
4. Oh! Darling 	  	
5. Octopus's Garden 	  	
6. I Want You (She's So Heavy) 	  	
7. Here Comes the Sun 	  	
8. Because 	  	
9. You Never Give Me Your Money 	  	
10. Sun King 	  	
11. Mean Mr. Mustard 	  	
12. Polythene Pam 	  	
13. She Came in Through the Bathroom Window 	  	
14. Golden Slumbers 	  	
15. Carry That Weight 	  	
16. End 	  	
17. Her Majesty 	  	

My question is.....on the song subform how can I get the song index to 
automatically have the index inserted based on the number of tracks 
already entered.  In other words a running count?

For your information, here are my tables

Table: Album
Primary Key: id (number)
name (text)

Table: Song
Primary Key: id (number)
name (text)
index (number)
albumID (foreign key)

Relationship is One Album to Many Songs with Referential Integrity.

I really appreciate your help.
0
nospam21 (19047)
2/17/2005 6:12:23 AM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

8 Replies
843 Views

Similar Articles

[PageSpeed] 38

"Elliot W. Scott" <nospam@nospam.com> wrote in message news:mu2dndCuUJpUqInfRVn-pw@comcast.com...
>I have one table called Album
> another table called Song
>
> One Album has many songs
>
> I created an Album form that contains a Song Subform.
>
> in the Song table I have a field id which is the primary key, and another field called index
>
> The song index is a number that represents the song number on the record.
>
> For example on the Beatle's Album: Abbey Road the song indices are as follows:
>
> Track Listings
> 1. Come Together   2. Something   3. Maxwell's Silver Hammer   4. Oh! Darling   5. Octopus's Garden   6. I Want You (She's So 
> Heavy)   7. Here Comes the Sun   8. Because   9. You Never Give Me Your Money   10. Sun King   11. Mean Mr. Mustard   12. 
> Polythene Pam   13. She Came in Through the Bathroom Window   14. Golden Slumbers   15. Carry That Weight   16. End   17. Her 
> Majesty
> My question is.....on the song subform how can I get the song index to automatically have the index inserted based on the number 
> of tracks already entered.  In other words a running count?
>
> For your information, here are my tables
>
> Table: Album
> Primary Key: id (number)
> name (text)
>
> Table: Song
> Primary Key: id (number)
> name (text)
> index (number)
> albumID (foreign key)
>
> Relationship is One Album to Many Songs with Referential Integrity.
>
> I really appreciate your help.

the short answer, I think, is that you should use this function as the default value for the ID (index) number:

dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1

This means: the maximum value for index in the song table where the albumID is equal to the album ID that is currently shown in 
myform.

I am not sure what you should have instead of myform, but someone else or yourself may figure this out.

Nicolaas 


0
winandwaves (256)
2/17/2005 6:45:40 AM
windandwaves wrote:
> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1

Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
As the first one will return a null.
or (not sure but try)
Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
would be portable to another form.

-- 
This sig left intentionally blank
0
nospam1955 (773)
2/17/2005 8:09:11 AM
Trevor Best wrote:

> windandwaves wrote:
> 
>> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1
> 
> 
> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
> As the first one will return a null.
> or (not sure but try)
> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
> would be portable to another form.
> 


I think something is wrong I get an #error


            I don't know what this is.
                      \/
Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1


Is [song] my Song table?  or should it be the song id?
0
nospam21 (19047)
2/17/2005 5:38:47 PM
Trevor Best wrote:

> windandwaves wrote:
> 
>> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1
> 
> 
> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
> As the first one will return a null.
> or (not sure but try)
> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
> would be portable to another form.
> 


I think something is wrong I get an #error


            I don't know what this is.
                      \/
Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1


Is [song] my Song table?  or should it be the song id?
0
nospam21 (19047)
2/17/2005 5:38:58 PM
Trevor Best wrote:

> windandwaves wrote:
> 
>> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1
> 
> 
> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
> As the first one will return a null.
> or (not sure but try)
> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
> would be portable to another form.
> 


I think something is wrong I get an #error


            I don't know what this is.
                      \/
Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1


Is [song] my Song table?  or should it be the song id?
0
nospam21 (19047)
2/17/2005 5:39:14 PM
Elliot W. Scott wrote:
> Trevor Best wrote:
> 
>> windandwaves wrote:
>>
>>> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1
>>
>>
>>
>> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
>> As the first one will return a null.
>> or (not sure but try)
>> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
>> would be portable to another form.
>>
> 
> 
> I think something is wrong I get an #error
> 
> 
>            I don't know what this is.
>                      \/
> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
> 
> 
> Is [song] my Song table?  or should it be the song id?

dmax(fieldname,tablename,criteria)
Yes, that should be your song table.

Also, where is this DMax being executed from?

Have you tried the:
Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
approach?

If addressing the form from code, you should use Me instead of Form, e.g.
Nz(dmax("[index]","[song]", "[albumID]=" & Me.Parent!albumID),0)+1

Alternatively you should put this DMax into the DefaultValue property, 
don't put in the ControlSource property, if you do it needs a "=" before 
it and it won't save it anywhere.

-- 
This sig left intentionally blank
0
nospam1955 (773)
2/17/2005 6:41:04 PM
Trevor Best wrote:
> Elliot W. Scott wrote:
> 
>> Trevor Best wrote:
>>
>>> windandwaves wrote:
>>>
>>>> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1
>>>
>>>
>>>
>>>
>>> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
>>> As the first one will return a null.
>>> or (not sure but try)
>>> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
>>> would be portable to another form.
>>>
>>
>>
>> I think something is wrong I get an #error
>>
>>
>>            I don't know what this is.
>>                      \/
>> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
>>
>>
>> Is [song] my Song table?  or should it be the song id?
> 
> 
> dmax(fieldname,tablename,criteria)
> Yes, that should be your song table.
> 
> Also, where is this DMax being executed from?
> 
> Have you tried the:
> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
> approach?
> 
> If addressing the form from code, you should use Me instead of Form, e.g.
> Nz(dmax("[index]","[song]", "[albumID]=" & Me.Parent!albumID),0)+1
> 
> Alternatively you should put this DMax into the DefaultValue property, 
> don't put in the ControlSource property, if you do it needs a "=" before 
> it and it won't save it anywhere.
> 

Thanks.  I had to do the it as follows:
=Nz(DMax("[index]","[Song]","[albumID]=" &[Forms]![AlbumForm]![id]),0)+1

but it still doesn't work, it does it in a weird pattern...

It does this for my index:
1
1
2
2
3
3
4
4
5
5
6
6
.....


I think it does this because the new record is created before I am done 
with the one I am currently creating. :(

0
nospam21 (19047)
2/17/2005 8:15:36 PM
Elliot W. Scott wrote:
> Trevor Best wrote:
> 
>> Elliot W. Scott wrote:
>>
>>> Trevor Best wrote:
>>>
>>>> windandwaves wrote:
>>>>
>>>>> dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID)+1
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
>>>> As the first one will return a null.
>>>> or (not sure but try)
>>>> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
>>>> would be portable to another form.
>>>>
>>>
>>>
>>> I think something is wrong I get an #error
>>>
>>>
>>>            I don't know what this is.
>>>                      \/
>>> Nz(dmax("[index]","[song]", "[albumID]=" & form.Parent!albumID),0)+1
>>>
>>>
>>> Is [song] my Song table?  or should it be the song id?
>>
>>
>>
>> dmax(fieldname,tablename,criteria)
>> Yes, that should be your song table.
>>
>> Also, where is this DMax being executed from?
>>
>> Have you tried the:
>> Nz(dmax("[index]","[song]", "[albumID]=" & forms!myform!albumID),0)+1
>> approach?
>>
>> If addressing the form from code, you should use Me instead of Form, e.g.
>> Nz(dmax("[index]","[song]", "[albumID]=" & Me.Parent!albumID),0)+1
>>
>> Alternatively you should put this DMax into the DefaultValue property, 
>> don't put in the ControlSource property, if you do it needs a "=" 
>> before it and it won't save it anywhere.
>>
> 
> Thanks.  I had to do the it as follows:
> =Nz(DMax("[index]","[Song]","[albumID]=" &[Forms]![AlbumForm]![id]),0)+1
> 
> but it still doesn't work, it does it in a weird pattern...
> 
> It does this for my index:
> 1
> 1
> 2
> 2
> 3
> 3
> 4
> 4
> 5
> 5
> 6
> 6
> ....
> 
> 
> I think it does this because the new record is created before I am done 
> with the one I am currently creating. :(
> 

Try requerying the index textbox in Form_BeforeInsert()

-- 
This sig left intentionally blank
0
nospam1955 (773)
2/17/2005 9:45:28 PM
Reply:

Similar Artilces:

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but I don't know what software is >needed. Do you know? If so, please answer this post. Thanks. I think it comes down to semantics. "Licensed" vs "Loaded". No you can't create an app that will run on a PC with nothing loaded. Yes you can create an app that will run on a PC where nobody's paid the fee to run MS Access. You still have to install something on that PC, however. What it is is a freebie version of MS Access that only runs applications - doesn't allow anybody to develop an app. You develop the app on your PC, which has MS Access installed. Then somebody installs the freebie ("Runtime Access") on somebody's PC and they can run the app you developed without having to pay any money to anybody. -- PeteCresswell Sue, If Access isn't present, some version of it must be installed to run an Access database. VB.NET, ...

Possible to keep MS Access interface and migrate the MS Access to MS SQL Server?
Hello all Would it be possible to migrate the MS Access 2000 to MS SQL Server 2000? My application is using MS Access 2000 as database and as user interface such as forms. Now, I want to migrate the backend database from MS Access 2000 to MS SQL Server 2000. However, I want to keep the MS Access 2000 interface. Would it be possible? If I migrate the MS Access to SQL Server, would the queries, back-end VBA, macro, tables and forms be affected? Do I need to change the MS Access data type to SQL server supported data type? Which tool I can use to do the migration? Upsizing wizard or exporting...

request for explanation on access an database in ms access
This is the code that I found on the internet for accessing an ms access database: import java.sql.*; class Test { public static void main(String[] args) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // set this to a MS Access DB you have on your machine String filename = "d:/java/mdbTEST.mdb"; String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="; database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end // now we can get the connection from the DriverManager Connection con = DriverManager.getConnection( database ,"",""); } catch (Exception e) { System.out.println("Error: " + e); } } } What I don't understand is the declaration of database. What I did was putting the database in the same dir as the sourcecode and use "jdbc:odbc:CafeJolt.mdb". But this doesn't work. And the above code does, why is that??? Actually it's not Java question. It's ODBC question. You have to have ODBC connection. Depending of Windows it's usually something like this (for my Windows 2000): Start->Sttings->Control Panel->Administartive Tools->Data Sources(ODBC)-> User DSN -> [Add]-> Driver to Microsoft Access(*.mdb) === And here, finally you can choose file name. ...

Access MS-ACCESS database on server from client????
I m currently developing a java based application and want to know how can i make client access database located on the server? "HeMan_Speaks" <Lunar20092010@gmail.com> wrote in message news:d71ce567-0434-48b8-b1d2-bb191706ab45@w8g2000prd.googlegroups.com... >I m currently developing a java based application and want to know how > can i make client access database located on the server? I think you're going to have to expand a little bit more in your question here, as is not 100% quite clear what you're trying to do. You might want to make a little bit of a distinction between MS access, the development system that allows you to write code, build forms, and build reports, and that of the database engine that you choose to use with MS access. When you build an application MS access, you then choose your database engine, that might be oracle, SQL server, or perhaps more often leave the default jet database. So when you say make a client access application, are you talking about a piece of software that you plan to install and each computer? The fact that your introducing the issue of java further complicates your question. Perhaps your question is simply you have some java code running on a server, and with to open a mdb file (an access database file). In this situation you're not really using MS access at all here (you using what is called the jet database engine to read that mdb file). For all the trouble in this type of sce...

MATLAB command to access MS Access database
Hi! Is there a MATLAB command which gives access to a .mdb MS Access database or do I need a special driver? Thanks, Andree Hi Andree Ellert, you can use activeXcontrol to interact with MS-Access database. access = actxserver('Access.Application'); returns the handle for Access. set(access, 'Visible', 1); will show the opened Access window. use get(access) and set(access) commands to find the methods available to call. -Vadivelu M =========== http://www.mathworks.com/access/helpdesk/help/toolbox/database/datatool.shtml "Andree Ellert" <ellert@gmx.net/////\\\\\> wrote in message news:eed9874.-1@webx.raydaftYaTP... > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree Andree Ellert wrote: > > > Hi! > > Is there a MATLAB command which gives access to a .mdb MS Access > database or do I need a special driver? > > Thanks, > > Andree <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4045&objectType=file> -Hardik ...

accessing ms access via ODBC without Microsoft Access
Hi, If I have a computer without Microsoft Access installed but with an ODBC connection to a .mdb file - can I still access the 'database' via ODBC? thanks Tim <timasmith@hotmail.com> wrote in message news:1145206985.433826.106120@i40g2000cwc.googlegroups.com... > Hi, > > If I have a computer without Microsoft Access installed but with an > ODBC connection to a .mdb file - can I still access the 'database' via > ODBC? Yes, provided you are running a program prepared in a language that supports ODBC and have installed an ODBC driver on that user's machine. What you cannot do is to access a Jet (often called Access) database via ODBC from Access. You can link to tables in that Jet database, or open it directly, but you can't ODBC to Jet tables from Access itself. Larry Linson Microsoft Access MVP ...

Date picker from MS-Access 2000 to MS-Access 2003
Hello. How do I get a date picker (References: Microsoft Calendar Control 8.0 Location C:\Windows\System 32\mscal.ocx) inset in MS-Access 2000, to work in MS-Access 2003. TIA J�rn Why not scrap it and use the all-API approach Stephen Lebans has at http://www.lebans.com/monthcalendar.htm -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message news:42190d18$0$48635$edfadb0f@dread15.news.tele.dk... > Hello. > > > > How do I get a date picker (References: Microsoft Calendar Control 8.0 > Location C:\Windows\System 32\mscal.ocx) inset in MS-Access 2000, to work > in > MS-Access 2003. > > > > TIA > > J�rn > > Allen Browne has an excellent calendar control at http://allenbrowne.com/tips.html -- PC Datasheet Your Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com www.pcdatasheet.com "JHB" <joern_bea@removeThis_tdcadsl.dk> wrote in message news:42190d18$0$48635$edfadb0f@dread15.news.tele.dk... > Hello. > > > > How do I get a date picker (References: Microsoft Calendar Control 8.0 > Location C:\Windows\System 32\mscal.ocx) inset in MS-Access 2000, to work in > MS-Access 2003. > > > > TIA > > J�rn > > Thanks for the link...

How to access MS Access from Perl?
Hi, Good day! I am writing some Perl script on the server side for HTML forms that can create/update an MS Access database. Does anyone know of examples how this can be done? Your help is greatly appreciated. -lc Email to luican@yahoo.com bounces. Anyway, try DBI and DBD::ODBC. Or maybe DBD::ADO, but I've never tried it. ---------------------------------------- http://cpan.org http://search.cpan.org/~jurl/DBD-ODBC-1.09/ODBC.pm ... Connect without DSN The ability to connect without a full DSN is introduced in version 0.21. Example (using MS Access): my $DSN = 'driver=Mi...

Best way to access a remote MS ACCESS database
What is the best way, via the internet, to access a remote Microsoft Access database? I was thinking of using VPN, but I thought that I would check here to see if there is a better way. Any suggestions? Thanks Do you mean remotely controlling an Access database, or linking tables over the internet? The first is doable, the second is a recipe for disaster. Remote Control: If your remote OS is Windows XP, you can use Remote Desktop (although only 1 person can access the PC at a time; this will change in the upcoming Service Pack for XP, but that may not help you now). Otherwise, GoToMyPC offers similar services, as does Terminal Server (a component of a Windows Server machine), PCAnywhere, et al. Linking to remote tables: You will almost certainly encounter severe problems with corruption, and your performance will almost certainly be so poor as to be unworkable. I attempted this once, with a web server in Canada and my machine in Augusta, GA. Even tiny data requests on a very well optimized data structure took waaaay too long to process ... it's simply not workable, IMO. Other alternatives would be covert the app to a web-based and place your data on a web server. Access/Jet isn't really designed for those workloads, but running a small site with minimal transactions and users can be done. Otherwsie, consider switching to a more robust data platform like MySQL, SQL Server, etc. -- Scott McDaniel CS Computer Software Visual Bas...

Accessing MS ACCESS database using Data Environment
HI, I have developped a program in Visual Basic 6.0 using MS Access database. I have created all my reports through Data Environment where I have entered the location of my database file (for e.g c:\project\app\test.mdb) in the Connection properties. I have installed my application on another PC using Package & Deployment wizard. When viewing the reports on the other PC, I have to enter everytime the new location of the database. How can I solve this problem, please? nadia wrote: > HI, > I have developped a program in Visual Basic 6.0 using MS Access database. >...

Accessing a MS Access database across two servers
Hi The technical support guys at my company have set up my system so that the server containing the MS Access database is on one server, while the pages that should access the database are on another server. When the pages and database are on the same server, I usually just connect through ODBC. The problem is that I don't know how to set up an ODBC connection to link from one server to a database in another. Anyone know what I am getting at and know of a possible solution, or a link to a site which may help. thanks in advance Brendan "Singularity" <Brendan.Collins@Singularity.co.uk> wrote in message news:1118749208.204709.287950@g49g2000cwa.googlegroups.com... > Hi > > The technical support guys at my company have set up my system so that > the server containing the MS Access database is on one server, while > the pages that should access the database are on another server. > > When the pages and database are on the same server, I usually just > connect through ODBC. > > The problem is that I don't know how to set up an ODBC connection to > link from one server to a database in another. > > Anyone know what I am getting at and know of a possible solution, or a > link to a site which may help. > I think this may be more of a network issue than an Access one. Can you see both servers from your PC? Is there any particular reason why they've been put on different servers? Seems a little odd to...

Running a ms access database with access 2003 in Vista
I have a Database that I am trying to run on a new vista computer. Up to now I was running it on a win 98 computer and using access 2003! I installed access 2003 and I can make it run and view the data but I can not save any new records. Has any one seen this problem yet? Thanks Clarence Wollman On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewollman@gmail.com> wrote: Do you have the same problem with the Northwind sample application? (search your computer for northwind.mdb) -Tom. >I have a Database that I am trying to run on a new vista computer. Up >to now I was running it on a win 98 computer and using access 2003! I >installed access 2003 and I can make it run and view the data but I >can not save any new records. >Has any one seen this problem yet? > >Thanks Clarence Wollman On Aug 22, 7:29 pm, Tom van Stiphout <no.spam.tom7...@cox.net> wrote: > On Wed, 22 Aug 2007 13:17:13 -0700, cwoll <clarencewoll...@gmail.com> > wrote: > > Do you have the same problem with the Northwind sample application? > (search your computer for northwind.mdb) I don't have a problem opening and editing the northwind.mdb. Thanks Hi I found a workaround. This database has a fronted and a backed. When I link them in the linked table manager, I was going threw the network to my computer. The reason I am doing this is when any networked computer opens the shortcut to the front end of this computer the linked table manger knows...

access to Access
We use MS access 2000 at work and few people know how to work it including me. We are using it on a network and more than one person is trying to access it at once. Needless to say this isn't working as one has to log out first before another can enter data. Is there an easy way around this? Or a complicated way, actually I'll take anyway. Thanks Mike We have just started this database so any changes would be better done sooner. Mike Kelliher wrote: > We use MS access 2000 at work and few people know how to work it > including me. > We are using it on a network and more than one person is trying to > access it at once. Needless to say this isn't working as one has to > log out first before another can enter data. Is there an easy way > around this? Or a complicated way, actually I'll take anyway. > Thanks Mike > We have just started this database so any changes would be better done > sooner. It's highly recommended to have the database split with the data on the shared network drive and a copy of the frontend (forms/reports/etc) on each PC. You'll still get issues if people try to edit the same record for example. Also, you must make sure each user has permission to create new files on the network dive/folder where the MDB is located as Access dynamically creates an LDB file for record locking. If they can't create this file then Access reverts to single-user only. -- regards, Br@dley Br@dley wrote:...

Use ASP to read MS Access query that calls MS Access function
Hi: I have an MS Access query for a table called MyTable. One of my fields in the query is a custom field that looks like "MyField: = MyFunction(ID)" where ID is a field in MyTable. I have ASP code and I can use it to read the query OK when "MyField" is not part of the query. If I add in MyField and then run my ASP code to try to read all the query fields, I get an error message on my web browser which says something to the effect of "cannot find MyFunction." On the Access side, I have MyFunction set up in a module and use the keyword "Public" in front of the function name. What else do I need to do to get my ASP code to run this query. I'm trying to avoid reproducing MyFunction within the ASP code if possible. Thanks. Kevin On Thu, 14 Jun 2007 21:38:19 -0000, k-man <kmccrack@gmail.com> wrote: Sorry, no can do. From ASP you don't have access to the Access VBA interpreter. -Tom. >Hi: > >I have an MS Access query for a table called MyTable. One of my >fields in the query is a custom field that looks like "MyField: = >MyFunction(ID)" where ID is a field in MyTable. > >I have ASP code and I can use it to read the query OK when "MyField" >is not part of the query. If I add in MyField and then run my ASP >code to try to read all the query fields, I get an error message on my >web browser which says something to the effect of "cannot find >MyFunction."...

Accessing Access
Hello, what would be a good module for accessing data contained in a MS Access database file? Are there any examples of doing this that you know of? In article <nn1Ah.2617$2%1.2205@trndny02>, <QoS@domain.invalid.com> wrote: > >Hello, what would be a good module for accessing data contained in >a MS Access database file? Are there any examples of doing this >that you know of? Depends what kind of platform you can use. If you are under Windows, DBD::ODBC will work wonders. If you `bridge' Windows <-> Unix, you can set up a DBI::ProxyServer on a windows...

Accessing 2 tables having same name but different databases ms-access
Hi, I have an application with MS-Access as backend and JSP/ tomcat as frontend/webserver. For getting better response time(as access is very slow compared to other RDBMS's), I have split the main DB into two DB's on different disks on my server for better performance.I have kept the table names same but changed the DB names. How do I access tables from both the DB's? This is what I have done; I made different connection to the respective DB's i.e. con and con2. When I want to access data, I am using 2 result sets for retriving data from the tables, but getting no result. Here is my code: rs2_1=stmt2_1.executeQuery("select * from Requests where Status='Released' AND LoginName='"+login+"' order by Req_No"); rs=stmt.executeQuery("select * from Requests where Status='Released' AND LoginName='"+login+"' AND Req_No> 5500 order by Req_No"); So, rs & stmt are for latest records and rs2_1 & stmt2_1 correspond the records from older DB. I think, I'm forgetting some small thing but cant get it. Please advice. What do you mean "no result"? Does "next()" return false for both rs2_1 an= d rs? If you're really trying to improve response time, you should probably be ru= nning the two queries in separate threads ... but as you acknowledge, Acces= s may not have as high performance as other RDBMSs. You would also see rel= iability adv...

accessing MS Access database fila via ODBC problem
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env, &hdbc); SQLBrowseConnect(hdbc, (UCHAR*)DSN, strlen(DSN), (UCHAR*)buf, BUF_SIZE, (SQLSMALLINT*)&rcvlen); The function SQLBrowseConnect fails and SQLGetDiagRec returns "IM001 Driver does not support this function" Can anyone help me? Thanks! David On Sun, 10 Jul 2005 12:55:30 +0200, David Siroky <dsiroky@email.cz> wrote: >Hi! > >I'm trying to connect to a MDB file via ODBC like this: > >char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; > >SQLAllocEnv(&env); >SQLAllocConnect(env, &hdbc); >SQLBrowseConnect(hdbc, > (UCHAR*)DSN, > strlen(DSN), > (UCHAR*)buf, > BUF_SIZE, > (SQLSMALLINT*)&rcvlen); > >The function SQLBrowseConnect fails and SQLGetDiagRec returns >"IM001 Driver does not support this function" > >Can anyone help me? > >Thanks! > >David > Hi Maybe you need to post to another group, this one is very VB-based, but 1. Can't you use ADO instead of ODBC? It is a lot ea...

Accessing a passworded MS Access 2000 database in Crystal Reports
Can anybody give me some code that I can put in to my VB6 app to open a passworded Access database in the Crystal Reports 8.5 RDC? I see so many examples - none of which seem to work for me. I am using a native connection in Crystal ( pdbdao.dll). My current code is : Dim Report As New crPrintPreview Dim crTable As CRAXDRT.DatabaseTable Private Sub Form_Load() Set crTable = Report.Database.Tables.Item(1) varpath = CurDir crTable.Location = varpath & "\OrderManager.mdb" CRViewer1.ReportSource = Report CRViewer1.ViewReport End Sub All I receive is the message "Error opening file xxxxxxx etc" and then "Open Database session failed" Appreciate any help! Peter Tyler ...

Accessing a passworded MS Access 2000 database in Crystal Reports #2
Can anybody give me some code that I can put in to my VB6 app to open a passworded Access database in the Crystal Reports 8.5 RDC? I see so many examples - none of which seem to work for me. I am using a native connection in Crystal ( pdbdao.dll). My current code is : Dim Report As New crPrintPreview Dim crTable As CRAXDRT.DatabaseTable Private Sub Form_Load() Set crTable = Report.Database.Tables.Item(1) varpath = CurDir crTable.Location = varpath & "\OrderManager.mdb" CRViewer1.ReportSource = Report CRViewer1.ViewReport End Sub All I receive is the message "Error opening file xxxxxxx etc" and then "Open Database session failed" Appreciate any help! Peter Tyler ...

Free JDBC driver to access MS Access database from Linux enviroment.
I'm looking for a free JDBC driver that will allow me to acces a MSAccess database that resides on a Windows server from a JSPapplication that resides on a Redhat Linx server.Any suggestions would be appreciated.Thanks,Tim tim@nocomment.com wrote:> I'm looking for a free JDBC driver that will allow me to acces a MS> Access database that resides on a Windows server from a JSP> application that resides on a Redhat Linux server.> Any suggestions would be appreciated.Sounds like RmiJdbc is a solution.See <http://rmijdbc.objectweb.org>-- Thomas...

Accessing Oracle Tables from MS Access
How difficult is this? I'm having a tough time getting a simple select to work. I am using MS Access 2002 and Windows XP. What do I have to do to make a simple select statement like this work: select id from emp I have stumbled upon many websites although none straight to the point. Any help in how to get this done, or pointing me in the right direction of a book or website, would be greatly appreciated! berj Yes, I do have the table links working. But I did want to run the select for such things as grabbing the next number off of a sequence. As in: select test.nextval from dual; Where "test" is the name of an Oracle sequence. berj "Steve Jorgensen" <nospam@nospam.nospam> wrote in message news:bp0821lsd8tt5ec5jhvtgbt46fdvb2t3dt@4ax.com... > The easiest way is to link the table in Access, then query the link. Is that > how you're trying to do it? > > On Mon, 28 Feb 2005 21:25:36 -0800, "berj" <berj@adelphia.net> wrote: > > >How difficult is this? I'm having a tough time getting a simple select to > >work. > > > >I am using MS Access 2002 and Windows XP. > > > > > >What do I have to do to make a simple select statement like this work: > > > >select id from emp > > > > > >I have stumbled upon many websites although none straight to the point. > > > > > >Any help in how to get this done, or pointing ...

ms access data access pages
hi my self uttam . i am working in r & d organization . friends i need a he lp from u . if any one of u know how add two sections(consisting of caption, header, footer ) be displayed on the same data page in ms access 2003 or 2005.i tried to display two tables on the data page in tabular format but i could not do it. it is allowing to display one table but it is not allowing to display the other table separately in tabular format . i want more than one table in tabular format to be dispalyed in data page separately with some text in-between tables. plz reply me with regards uttam On Mar 24, 5:06 am, kunu...@gmail.com wrote: > hi my self uttam . i am working in r & d organization . friends i > need a he lp from u . if any one of u know how add two > sections(consisting of caption, header, footer ) be displayed on the > same data page in ms access 2003 or 2005.i tried to display two tables > on the data page in > tabular format but i could not do it. it is allowing to display one > table but it is not allowing to display the other table separately in > tabular format . i want more than one table in tabular format to be > dispalyed in data page separately with some text in-between tables. > plz reply me > with regards > uttam Use a form and subforms. ...

MS Access trying to access the Internet
The personal firewall on my computer keeps informing me that MS Access is trying to access the Internet. I deny the process from continuing, so I don't know where it is trying to go. Is this typical behavior for MS Access? Thanks. ...

MS Access remote access from ADO
Hi all, first of all, sorry, my English is horrible. I have a local Borland Visual C++ application that uses an Access .mdb file as DB. I need to make this application distributed, with a centralized DB and many clients accesing to it. Could somebody suggest a way to do this if: - If possible, I want to keep Access as DB, because I would have probably to change many queries and I don�t have enough time to do it. If possible, we won�t to use a database server, like MSDE or MySQL (as you can see, we can afford a licensed product as SQLServer). - I can connect a client to a .mdb file in another machine in my LAN, so I know I can solve the problem by using a VPN, but we want to avoid it, too. Is there any way to connect my program to a remote .mdb file (through the Internet) without using a database server? Is there any way to do what I want? Perhaps it's impossible.... Any help would be very appreciated. Thanks and sorry again, Besbello On 3 Mar 2005 10:31:47 -0800, besbello@gmail.com (Besbello) wrote: Right. You first tie both of my hands behind my back, and then you're asking for my help? Translation: don't say "we can't do this, and can't do that". Those are (hopefully) conscious decisions, and who makes them should be willing to live with the consequences. Access db's can only successfully be accessed over the LAN or using some form of terminal services. -Tom. >Hi all, >first of all, sorry, my English is horrible. >I have...

Web resources about - MS Access Question for Access Gurus - comp.databases.ms-access

West Lothian question - Wikipedia, the free encyclopedia
He illustrated his point by pointing out the absurdity of a Member of Parliament for West Lothian being able to vote on matters affecting the ...

Thirteen tough questions every couple should ask for a successful marriage
These intimate and sometimes awkward questions give couples a chance to spill secrets before it's too late.

Arnold Schwarzenegger terminates Weekend Sunrise interview after questions on US presidential campaign ...
He's famous for saying he'll be back, but Arnold Schwarzenegger may think twice about appearing on Weekend Sunrise again.

South Carolina police officer killed trying to question teen
A South Carolina police officer was shot and killed Friday as he and a partner were trying to question a self-professed gang member who they ...

"It’s a question every candidate for state Supreme Court is asked: Which U.S. Supreme Court justices ...
Writes the left/liberal Bill Lueders at the end of his Isthmus piece "Battle for the [Wisconsin Supreme] court/Bradley v. Kloppenburg is a classic ...

The question nobody dares to ask about strategy
Picture by Henrik Mårtensson I originally published this article at Linkedin Pulse : When I transitioned from my work as a developer and systems ...

17 former Google interview questions so ridiculous that the company banned them
Sometimes the hiring practices of even the most successful companies can feel outright wonky. There can be strange interview questions that ...

S.C. police officer killed trying to question teen
S.C. police officer killed trying to question teen

14 great responses when a job interviewer asks, 'Any questions for me?'
So you managed to get through a phone screen, ten resume revisions, and a lot of anxious moments when you were convinced they were ignoring you. ...

South Carolina police officer killed trying to question man
New York Daily News South Carolina police officer killed trying to question man Charlotte Observer Police officers work the scene of an officer-involved ...

Resources last updated: 3/21/2016 11:29:23 AM