Skip to content

Instantly share code, notes, and snippets.

@el3um4s
el3um4s / openForm.vb
Created October 27, 2022 14:15
MEDIUM - How To Link Forms in Access - 05
Public Function openNotes()
Notes.openFormNotes
End Function
Public Function openInfo()
Notes.openFormInfo
End Function
@el3um4s
el3um4s / link.vb
Created October 27, 2022 14:14
MEDIUM - How To Link Forms in Access - 04
@el3um4s
el3um4s / addReference.vb
Created October 27, 2022 14:14
MEDIUM - How To Link Forms in Access - 03
Public Function AddReference(referenceToImport As String, nameDatabase As String)
Dim reference As reference
For Each reference In Access.References
Dim nameReference As String
nameReference = reference.Name
If nameReference = referenceToImport Then
Access.References.Remove reference
End If
Next reference
@el3um4s
el3um4s / customDB.vb
Created October 27, 2022 14:13
MEDIUM - How To Link Forms in Access - 02
Public Sub openFormNotes()
DoCmd.OpenForm "frmNotes"
End Sub
Public Sub openFormInfo()
DoCmd.OpenForm "frmInfo"
End Sub
@el3um4s
el3um4s / customDB.vb
Created October 27, 2022 14:12
MEDIUM - How To Link Forms in Access - 01
Public Function getNameCurrentDB()
Dim db As DAO.Database
Set db = CurrentDb()
Dim name As String
name = db.name
Set db = Nothing
getNameCurrentDB = name
@el3um4s
el3um4s / app.ts
Created October 19, 2022 10:35
MEDIUM - Implementing Multi Language Without Any Library in Svelte - 07
import { onMount } from "svelte";
import lang from "./Components/UI/Languages/Lang";
import { getLang } from "./Components/UI/Languages/IndexDB";
onMount(async () => {
const langDB = await getLang();
lang.set(langDB);
})
@el3um4s
el3um4s / store.ts
Created October 19, 2022 10:34
MEDIUM - Implementing Multi Language Without Any Library in Svelte - 06
const lang = {
subscribe: languageStore.subscribe,
set: (language: LangSupported) => {
languageStore.set(language);
setLang(language);
},
};
@el3um4s
el3um4s / localDB.ts
Created October 19, 2022 10:33
MEDIUM - Implementing Multi Language Without Any Library in Svelte - 05
import { get, set, createStore } from "idb-keyval";
import type { LangSupported } from "./Languages";
import { isOfTypeLangSupported } from "./Languages";
const customDbName = "idb-lang";
const customStoreName = "idb-lang-store";
const customStore = createStore(customDbName, customStoreName);
@el3um4s
el3um4s / Page.ts
Created October 19, 2022 10:33
MEDIUM - Implementing Multi Language Without Any Library in Svelte - 04
<script lang="ts">
import Lang from "../../UI/Languages/Lang.svelte";
</script>
<ul>
<li>
<Lang p="Home" w="Encrypt" />
</li>
<li>
<Lang p="Home" w="Encrypt your text" />
@el3um4s
el3um4s / Lang.svelte
Created October 19, 2022 10:29
MEDIUM - Implementing Multi Language Without Any Library in Svelte - 03
<script lang="ts">
import lang from "./Lang";
import { languages } from "./Languages";
export let p: string;
export let w: string;
</script>
{languages[p][w][$lang]}