Search results

  1. P

    Another Login form question

    You're welcome... don't forget to hit me scale ;-). Regards, Premy
  2. P

    Form Help

    Well the code in my example is ok. Did u run it like that? Did u step thru the code to debug it? Is userid integer or string?
  3. P

    Adding records based on Subform

    Well u can also build a separate append query; in that case the criteria collection changes Insert Into... Select...WHERE tblCourse.CourseTitle= Forms!StudentMainForm!cboCourseTitle Order by...;" U can then run this query thru cboCourseTitle's Afterupdate event. Sub cboCourseTitle_Afterupdate...
  4. P

    Tables, etc. issue with regions and countries

    You're welcome... don't forget to hit my scale ;-). Regards, Premy
  5. P

    Multiple field query

    That's right ajetrumpet...
  6. P

    Multiple field query

    How could u have 2 criterias for the same field? You're telling the query to retrieve 1 or more rows where field tblMain.Dt has the value 5/10/2006 AND the value 5/10/2007; it has to be either one or the other. In my example I showed u 2 ways to grab data from your form controls (textbox...
  7. P

    Adding records based on Subform

    Well a simple enough solution would be to transform frmRegistration's underlying query into an append query: Sub btnRegister_Cllick() Dim S as string S = "Insert Into... Select...WHERE tblCourse.CourseTitle= " & "'" Me.cboCourseTitle & "'" & " Order by...;" Docmd.RunSQL S End Sub This query...
  8. P

    show only the first Entry from Field1 but all from Field2

    A Q&D (quick and dirty) solution would be by implementing conditional formatting on field 1, setting the condition up like: "The expression is [Field1] <> 1111". If the condition is met the font should get the same color as th background, thus becoming invisible. If the first record of field2 is...
  9. P

    Form Help

    OK, did u get the OpenArgs thing? If so, u can do: Private Sub Form_Current() Dim rs As Object Me.Filter = "" Set rs = Me.Recordset.Clone rs.FindFirst "[UserID] = " & Me.OpenArgs If Not rs.EOF Then Me.Bookmark = rs.Bookmark Else DoCmd.GoToRecord , , acNewRec Me.UserID = Me.Openargs End...
  10. P

    Multiple field query

    Well first of all, u should always try to limit criteria collection to the available underlying data. This means that instead of having a textbox that ask for "Date Purchased" for example, u should provide a combo which displays only the dates for which there are purchases. This, in order to...
  11. P

    Parent-Child Cascading Deletes

    Check out: http://allenbrowne.com/ser-06.html HTH Premy
  12. P

    Need Help: automating continuous subform

    Well, this kind of project is hardly for "beginners". But the procedure I put in the link I gave u (http://www.access-programmers.co.uk/forums/showthread.php?t=138021) has everything u need to retrieve your recordset data. You only need to create a query which holds just the records you want to...
  13. P

    Tables, etc. issue with regions and countries

    Ok, the best approach would probably be something like this: tblProvider: ProviderID, CountryID, RegionID, StateID, CityID, Name, Address etc... tblCountry: CountryID, Name tblRegion: RegionID, CountryID, Name tblState: StateID, RegionID, CountryID, Name tblCity: CityID, StateID, RegionID...
  14. P

    Folder - Copying files etc.

    u might want to take a look at the Compact database method in the VBA help. HTH Premy
  15. P

    Form Help

    Ok, let's do it again This is the code for your command button on the 1st form: Sub btnClose_Click() Dim uzerID As Integer uzerID = Me.UserID DoCmd.OpenForm "Form2", , , , , , uzerID Docmd.close acForm, me.name End Sub The openform method takes several arguments (check vba help for details on...
  16. P

    Tables, etc. issue with regions and countries

    Cities too, can have identical names across different countries or even in the same country. I think u shoud have 4 tables: tblCountry tblRegion tblState tblCity tblRegion will have entries like: "North East", which may be the North East Region of the US, Mexico or Brazil. tblCity will have...
  17. P

    Form Help

    How about: Sub btnClose_Click() Dim uzerID As Integer uzerID = Me.UserID DoCmd.OpenForm "Form2", , , , , , uzerID Docmd.close acForm, me.name End Sub Now Form2: Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec End Sub 'Obviously, the previous code is only necessary if your 'form's...
  18. P

    Trouble executing Wayne Phillip's Outlook Security Warning Suppression Code

    Hi there, I copied the code from www.everythingaccess.com which should enable one to suppress the annoying security warning in outlook, but I can only get it to work if I start Outlook up beforehand. With OL not running I get a 438 error saying the object does not accept this method/property...
  19. P

    Parameters

    Sorry, TestMethod (strQry, strFile) should be TestMethod (sQry, sFile)
  20. P

    Parameters

    How about this? Private Sub txtRun_DblClick(Cancel As Integer) Dim sQry as string Dim sFile as string sQry = Me.txtQueryName sFile = Me.txtFileName If comboActions.ListIndex = 0 Then DoCmd.RunMacro "1 USAGE - Import and update data" ElseIf comboActions.ListIndex = 2 Then DoCmd.RunMacro "3...
Back
Top Bottom