In response to a request I received recently I am reposting the file I contributed 3 years ago in 2011 it is in now in ACCDB format for those of you so wishing to learn from the techniques therein.
Basically ignore the previous MDB format and go with this ACCDB format rejigged for Access 2007 through to Access 2013
Regards
Jim Doherty...
User Profile
Collapse
-
Jim Doherty replied to PK Field (Long Integer) from Form 1 to Populate FK Field (Long Integer) Form 2?in AccessYou can use the OpenArgs property of the 'Admissions' form to pick up on the value passed to it by any calling form.
How you are navigating between the two really is down to flavour of your design. The idea here could be for the Admissions form to test its 'OpenArgs' form property setting when it opens up, if it finds a value passed to it, then perform a sequence of logic. Look at and research the 'OpenArgs' property to see how this...Leave a comment:
-
Username as in what? is that a statically stored value in your table or SQL servers own user/roles mechanism. If it is a statically stored value within your table then the SELECT statement can be expanded to include that column in the usual manner.
I am not at all clear on what it is you need Denden from your original post as it is not explicit enough in terms of your framework to enable me to make a concise judgement on this.
...Leave a comment:
-
Jim Doherty replied to Can someone help me with a VBA code that wil help me open a form in MS Accessin AccessI appreciate I am in the .net forum here but from an Access perspective use the Access wizard and then look at the VBA code generated behind the form (that is unless you have generated the button with an access macro)
The vba syntax for opening a form in an 'Access environment' is documented in Access help but here is a clue:
Code:DoCmd.Openform(YourFormname)
Leave a comment:
-
Hello Denden,
Look at CAST and CONVERT functions for SQL server but here is a pointer for you from the perspective of a SELECT statement
Code:declare @v varbinary(max) set @v = 0x4465727374696E65 select * from [dbo].[Test] where [password]=CAST(@v as varbinary(max))
Leave a comment:
-
Field Selection
Hello cppd,
There are a number of ways you can do this and obviously it largely depends on techniques you employ and the relevant skill level in order to get it done.
One such method you might imagine is that of a list box of fields derived from your table and presented in a listbox on a screen dialog form. Your user then selects the fields they wish at which point you then define the SQL...Last edited by Jim Doherty; Aug 24 '14, 10:37 AM. Reason: Revised the attached file to include error handling, Anchoring of screen controlsLeave a comment:
-
Your code is staying on the first line of your recordset and remaining in an infinite loop
you need to insert.....
rs.MoveNext
as a line before the LOOP command so that the recordset can be traversed. At the moment it is not doing that.Leave a comment:
-
Search Demo
Anyone who might benefit in reading this:
As requested attached is the Access 2000 Search demo database I refer to earlier in this thread. (a zip file so extract to anywhere on your hard drive) There a a couple of other goodies thrown in like exporting the resultset to excel and so on.
Take a look at the code behind the forms It works for version 2000 and 2003 (note however if version 2007 it...Leave a comment:
-
Hi, Glad you sorted,
The MS walkthrough highlights the steps you can take inserting SQL in the passthrough SQL Window. What it does not outline unfortunately which would in my opinion be of benefit for the uninitiated, is that you can simply place the 'name' of the stored procedure in the passthrough SQL window.
Given the SQL for a stored procedure is actually resident on the server and not the client it would NOT necessarily...Last edited by Jim Doherty; Jul 14 '10, 05:31 PM.Leave a comment:
-
All sorts of logic can be applied here depending precisely on what it is you are doing but the general principle from only one perspective is to cancel out any on click event of that button with something simple
Code:If IsNull(Me!MyTextboxName) Then MsgBox "Hey you have not completed the textbox " & Me!TextBoxName.Name Exit Sub End If
Leave a comment:
-
In your mdb file Create a passthrough query you can either do that hardwired into your database as a saved query where the connection string is stored with the query ( my guess is you will not want this given the clutter it involves by having small queries taking up the database window) or you can create it in code and either save it(in code) so it becomes part of your database or run it as a 'temporary' query (ie a created querydef with no name...Last edited by Jim Doherty; Jul 14 '10, 09:21 AM.Leave a comment:
-
I rather thought it was an issue unrelated to the SPROC and string but hey ho it happens... so long as you are on track. Don't forget to utilise that profiler sometime when you have a minute free, it does give you a good idea of what server processes are doing and so on....Leave a comment:
-
The sproc I sent works. Without going through what you have your end it is rather difficult to understand why this is not working for you.
1) The server expects to receive input variables containing data sufficient to execute obviously.
2) The string variable being passed to the sproc demands a wrap of single quotes ie '213,423,416,41 7' The conversion against the INT column in your data then provides for a comparison...Leave a comment:
-
-
Not only is it a better idea you are keeping it server side and centralised should you so wish to edit the thing in future. Most CRUD operations should be done using that methodology if you are working unbound using an ADP...Last edited by Jim Doherty; Jul 12 '10, 02:35 PM.Leave a comment:
-
You simply open the view as an ADO recordset using the criteria applied in your where clause and grab the column (DiscCoursesTak en) value returned by the function as you would ordinarily...Leave a comment:
-
You are throwing a string into a LONG declared variable look at it
Code:Dim lngDiscCourses As LONG lngDiscCourses = "SELECT DiscCoursesTaken FROM vwStdDegReqTotals WHERE StdDegReqDiscId = " & lngDiscId
Last edited by Jim Doherty; Jul 12 '10, 01:54 PM.Leave a comment:
-
Your quest
Hi Procman :)
Well let us hope a whole bunch of people come piling in with useful hints and contributions.
I for one have a great deal of sympathy for the embattled, passionate, entrepreneurial individual trying to get the job done set against a portfolio of professionals offering nothing positive yet resisting/criticising till blue in the face.
It terms of database structure...Last edited by Jim Doherty; Jul 12 '10, 08:53 AM.Leave a comment:
-
Please be aware that Data Access pages are not MS supported beyond version 2003 and are deprecated in favour of ASP for website interfacing.
The runtime executable of Access 2007 however is a 'free' download and provided you are happy and able to develop in the latest retail version then the runtime version will give you the flexibility of distributing a royalty free application as opposed to buying additional licence to support 7...Last edited by Jim Doherty; Jul 11 '10, 10:16 PM.Leave a comment:
-
Here, here bravo Linq!!
What makes me smile many times is the assertion that just because you can make forms lightweight by rendering unbound as opposed to bound in favour of dealing with everything in a module with no form code that somehow you work more efficiently.
They never mention that by the time development finishes you are left with a module that is xxxxx thousand lines long and guess what! the developer moves...Last edited by Jim Doherty; Jul 11 '10, 03:06 PM.Leave a comment:
No activity results to display
Show More
Leave a comment: