Search results

  1. S

    Shading HTML Tables

    To apply style to a tag you either add a style section in the header or apply it directly in the tag. <div style='font-family:arial;color:blue;background-color: orange;'>Hi I'm blue text on an orange background</div>
  2. S

    Strange Date Picker Behavior

    Sounds like a corrupted memo field. When memo fields get corrupted their contents can span multiple fields. If the memo spans non text fields Access usually crashes, but if it only spans text fields it can just get confused and carry on working but with odd side effects. Back up your database...
  3. S

    How to check for running instance of access database and then update

    GetObject allows you to specify the file path... With GetObject("D:\dbtest\test_Database.mdb") .CurrentDb.Execute "insert into tstdata (nwtsk) values (" & sqlstr(test1) & ")" End With public function sqlstr(s) as string s=replace(s,"""","""""") s=replace(s,"'","''") sqlstr="'" & s & "'"...
  4. S

    me.name vs me.formname

    Right click object browser > Show hidden members If it's hidden you're better off not using it because it could get removed.
  5. S

    How to add a field and auto-populate values

    To add new fields to a table you can use sql alter table TABLENAME add FIELDNAME DATATYPE to update records in a table you can also use sql update TABLENAME set FIELDNAME1='some string', FIELDNAME2='some other string' [WHERE some condition is met] To split a string up into different parts you...
  6. S

    VB Dlookup Run-time error

    The real question is, why do a text search on a table that should have an ID?
  7. S

    Field Requirements based on conditional visibility

    But that's not based on any condition. Have a think about what I wrote above for a bit.
  8. S

    Field Requirements based on conditional visibility

    If visibility is based on Issue Type=Bindery then the condition is the same in both cases. Otherwise, I don't understand. I don't see you setting the tag anywhere. Private Sub Issue_Type_AfterUpdate() Me.cboPressInitials.Visible = False dim b as boolean b=Me.[Issue Type] = "Bindery"...
  9. S

    Decimal place issue

    The only way a numeric data type would show as "Zero" (string) is if you've applied a format to the field...
  10. S

    sql query with variable field names

    Variables are values stored in memory that can change. Association isn't a variable. dest and UPDSQL are. dim dest as string, myval as string dest = "table1" myval = "'ANAR'" currentdb.execute "UPDATE [" & dest & "] SET SOMESTRINGFIELD = " & myval dest = "table1" myval = "#1/1/2017#"...
  11. S

    Dlookup in a query driving me carzy

    Well, yes, but he said he couldn't use joins even though he appears to be using a join. He's joining one value to another value to return a unique value (? or not) (we don't know what errors he's getting either). Whether a query is updateable or not is down to primary keys (which we know nothing...
  12. S

    Dlookup in a query driving me carzy

    A record can only have one value per field so the dlookup has to return a single value. In which case he could use a join. This makes no sense.
  13. S

    sql query with variable field names

    As plog said. The table is already a variable. Fields are handled exactly the same way.
  14. S

    Dlookup in a query driving me carzy

    use a comma instead of the semicolon.
  15. S

    add image file to a form on open event

    Not sure what your question is. You can load a picture into an image control just by using its path image0.picture = "c:\xxx\yyy\picture.gif" No tables are required.
  16. S

    How can I determine the "mode" of a Report?

    Dim WithEvents rpt As Report 'open the report and get its events, hide this form Private Sub Command0_Click() DoCmd.OpenReport "report1", acViewPreview Set rpt = Reports!report1 'ensure close event is enabled 'the report needs to have a module rpt.OnClose = "[event...
  17. S

    Best use of Macros

    Cool. Our applications are all locked up. Nobody else gets at them without our sayso. I guess this has gone way off topic now. I'm sure OP wasn't talking about triggers/data macros. But if anybody has a simple working data macro example, I'd be interested in looking at it myself. :)
  18. S

    Best use of Macros

    A user would never have direct access to sql server tables, and recording audit logs can be done easily from code (within a transaction) whereas you'd need a separate trigger for each table being audited. Access users will always have direct access to tables. And since user-level security is no...
  19. S

    try two (or more) paths in one code

    If files are on a network you should use UNC. Then you don't need to worry about mapped drives. https://pagecommunication.co.uk/2014/07/15/vba-to-convert-a-mapped-drive-letter-to-unc-path/
Back
Top Bottom